Skip to content

Format

typescript
SceneManager.GetSceneByName(name)

class: SceneManager

Description

Get a scene by its name.

This method searches for a scene with the specified name in the list of loaded scenes and returns a Scene object.

Parameters

param_nametypedescription
nameStringThe name of the scene.

Return

typedescription
SceneThe scene.

Code Example

typescript
 const scene = SceneManager.GetSceneByName("test");