- Home /
What is "transform" here? Is it an object of "Transform" class?Why is it in lower case?
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
void Update() {
transform.Rotate(Vector3.right * Time.deltaTime);
transform.Rotate(Vector3.up * Time.deltaTime, Space.World);
}
}
1) please format your code when posting here.
2) transform
is the transform component of the game object. read the tutorial docs or more info.
I formatted your code for you, it's the 101010 button, if you can't see that button or the bold/italics etc. try a different browser, but next time you post make sure you format your code as it makes it very difficult to read if not formatted.
Answer by tanoshimi · Mar 01, 2015 at 08:50 AM
It's the Transform component attached to this gameobject (shorthand for GetComponent()), and is explained in the documentation: http://docs.unity3d.com/ScriptReference/GameObject-transform.html
Your answer
Follow this Question
Related Questions
numerous errors with super basic door transform 1 Answer
Max Transform position 2 Answers
How to reset a gameobject's transform? 2 Answers