- Home /
Question by
Supercrusher9000 · Jun 27, 2014 at 01:43 AM ·
error
Unity2d NullReferenceException
Hi, here is the portion of my script that is causing the compllier errors Nullreferenceexception. I'm at a loss to why this is happening. var moveSpeed : float = 10F;
function Update() {
Movement();
} function Movement() {
if(Input.GetKey (KeyCode.D)){ { transform.Translate(Vector2.right 4f Time.deltaTime0); } } }
Comment
Is your script attached to a game object with transform component? And what is that Time.deltaTime0 for?
please learn how to use codetags.
click on the '101' icon above the window where you type the question.
readable questions are answered more often...
I know that was my bad, I has to post this in a hurry
Your answer
