Introduction to Transform in Unity

Notes:

Transform Class - Introduction
Transform class contains various properties and methods; which help us in changing the position, orientation and size of a game object.

Changing position means translating, changing orientation means rotating, changing size means scaling. Translating, rotating and scaling a game object altogether is known as transforming a game object.

W.K.T. Every game object in the scene has a Transform component; which displays position, rotation and scale of a game object with respect to world or its parent coordinate system. Using Transform component; we can change the position, orientation, and size of a game object visually.

If required we can also change position, rotation and scale of a game object via scripting. To change position, rotation and scale of a game object using a script; we take help of transform property available in every MonoBehaviour script. transform property is an instance of a Transform class; which stores position, rotation & scale of a game object to which a script is attached.

Note: As transform property is an instance of the Transform class; it allows us to access properties and methods of the Transform class; which help us in changing the position, orientation and size of a game object with respect to world or its parent coordinate system via scripting.