|
full error any ideas decided to try to build it and it gave me this warning Assets/Scripts/Inventory.js(62,56): BCW0028: WARNING: Implicit downcast from 'UnityEngine.Component[]' to 'UnityEngine.ParticleEmitter[]'.
(comments are locked)
|
|
var fireEmitters : ParticleEmitter[]; var fireEmitters : Component[];
(comments are locked)
|
|
This looks suspect: fireEmitters = campfire.gameObject.GetComponentsInChildren(ParticleEmitter) campfire is already a GameObject, so you should omit the .gameObject part of that line. took that part out same error
Mar 22 '12 at 02:29 AM
NiteFlamesInc
Which is line 62? It looks pretty ok. Sometimes putting 'as ParticleEmitter[]' after the GetComponents... call helps.
Mar 22 '12 at 02:38 AM
DaveA
NullReferenceException: Object reference not set to an instance of an object Inventory.LightFire (UnityEngine.GameObject campfire) (at Assets/Scripts/Inventory.js:63) Inventory.OnControllerColliderHit (UnityEngine.ControllerColliderHit col) (at Assets/Scripts/Inventory.js:53) UnityEngine.CharacterController:Move(Vector3) CharacterMotor:UpdateFunction() (at Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js:229) CharacterMotor:FixedUpdate() (at Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js:331) thats what i get for putting in 'fireEmitters = campfire.GetComponentsInChildren as ParticleEmitter[];'
Mar 22 '12 at 02:54 AM
NiteFlamesInc
(comments are locked)
|
|
I'm not 100% sure, but try:
(comments are locked)
|

One idea: hit the 'edit' link under your question, select the code parts, hit the 010/101 button above the text area, to format your code.
fixed sry bout that
Thanks,helps a bit. Which is line 62?