Skip to content

Format

typescript
Transform.name

class: Transform

Description

(Read Only) The name of the game object that the current Transform component is attached to.

Parameters

param_nametypedescription

Return

typedescription
stringThe name of the game object.

Code Example

typescript
OnStart(): void {
    let name = this.transform.name;
    Debug.Log(name);
    }