Skip to content

format

typescript
Component.transform

class: Component

description

(Read Only) The transform component attached to this game object.

Every game object comes with a Transform component, which contains the position, rotation, and scale information of the game object.

parameter

param_nametypedescription

reture

typedescription
TransformThe transform component.

code example

typescript
let go = new GameObject();
// Add a BoxCollider component to the game object
let com = go.AddComponent<BoxCollider>(BoxCollider);
com.transform;