Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 28 Dec 2012
Offline Last Active Apr 04 2013 02:57 PM

#5015125 Error from unity scripting tutorial... UnityEngine.Transform.position not a...

Posted by pengutech on 28 December 2012 - 12:28 PM

'this' refers to the script, not the gameobject, so you only need to put:

transform.position.z += 1;

In fact, you don't even need to put +=1 instead just use the shorthand version ++:

transform.position.z ++;

Is the final code, these tutorials were made quite a while ago and some of the unity api has changed since then.