I’m getting this error and I have no clue why, I used this spawn object method a while back and it worked.
The Error: NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetProperty (System.Object target, System.String name)
UnityScript.Lang.UnityRuntimeServices.GetProperty (System.Object target, System.String name)
CampFire.Update () (at Assets/_Scripts/CampFire.js:11)
My script:
var sticks : int = 0;
var rocks : int = 0;
var campFire : GameObject;
function Update () {
if( sticks == 10 && rocks == 10 && Input.GetKeyDown(KeyCode.E))
{
Instantiate(this.campFire, this.SpawnPoint.transform.position, this.SpawnPoint.transform.rotation );
}
}