Format
typescript
Transform.nameclass: Transform
Description
(Read Only) The name of the game object that the current Transform component is attached to.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
string | The name of the game object. |
Code Example
typescript
OnStart(): void {
let name = this.transform.name;
Debug.Log(name);
}