How to create/move a GameObject

From ETC Public Wiki
Jump to: navigation, search


Components of Game Object

Moving an Object

  • Every GameObject has a component called Transform.
  • Transform, controls the position, rotation, and the scaling of that Object.
void Update(){
     // Moving in the forward direction of this Object over time
     transform.Translate(Vector3.forward * Time.deltaTime);


Instantiate an Object

'Destroying an Object'