Skip to content

Format

typescript
Scene.name

class: Scene

Description

The name of the current scene.

The scene name can be used to identify and recognize scenes, typically used for loading, switching, or other scene-related operations in code.

Parameters

param_nametypedescription

Return

typedescription
stringThe name of the scene.

Code Example

typescript
 const scene = SceneManager.CreateScene("test"); 
 const name = scene.name;