Overview: Common Operations
Scripting
Overview: Common Operations

Most game object manipulations are done either through the game object's Transform and/or Rigidbody. These are accessible inside behaviour scripts through the member variables transform and rigidbody respectively. So if you wanted to rotate an object 5 degrees around its Y axis every frame you could write the following:

function Update() {
transform.Rotate(0, 5, 0);
}

If you want to move an object forward you would write this:

function Update() {
transform.Translate(0, 0, 2);
}