|
Trying to create a simple chronometer: var minutes : int = 0; var seconds : float = 0.0; function Update () { } I always get an error: NullReferenceException: Object reference not set to an instance of an object Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOperator (System.String operatorName, System.Object lhs, System.Object rhs) Time.Update () (at Assets/Scripts/Time.js:6) I also tried this tutorial and the code that was working fine in the video gave the same error for me again. Plus puting the Time.deltaTime in Debug.Log only shows Null... So I am stuck at this now :(
(comments are locked)
|
|
You can't call your script the same thing as a Unity class*, because then it's looking inside your Time script for deltaTime, which of course does not exist. * Unless you distinguish between them by specifying UnityEngine.Time, but that's a bit of a pain.
(comments are locked)
|

Please format your code properly.