- Home /
Question by
youngapprentice · Mar 03, 2013 at 10:54 PM ·
errormovementnullreference
Another Null Reference Exception
I know that it is usually hard to do community bug-spotting, but I really don't understand why this is being thrown at me. Maybe insight from you wise people will help.
I have a script that iTweens using MoveTo and a speed variable. I get the speed variable from another script on the object. This variable is set by the spawner when it is spawned before the movement function is even called, so I'm certain it exists...
I get this error:
EnemyMovement+$MoveEnemy$94+$.MoveNext () (at Assets/Scripts/Enemies/EnemyMovement.js:35) UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) EnemySpawner:SpawnEnemy(Transform, Int32, Vector3, Vector3, Vector3, Vector3) (at Assets/Scripts/Enemies/EnemySpawner.js:109) $:MoveNext() (at Assets/Scripts/Enemies/EnemySpawner.js:70) It seems to be referencing the spawn function and two scripts. I'm not sure why though. I checked and everything should work fine. Any bits of wisdom (and of course solutions) are welcome. Please tell me if I wasn't clear enough. Thanks! - YANullReferenceException: Object reference not set to an instance of an object
Comment
It seems that iTween doesn't enjoy variables being plugged into its hastables and will only accept numerical values. Why is this?