Skip to content

Format

typescript
SceneManager.mainScene

class: SceneManager

Description

Main Scene.

The editor supports displaying multiple scenes and can load or unload scenes to show or hide the game objects contained in each scene. The specific working principle is that each scene manages its own settings, and only the settings related to that scene are saved to the scene file. If multiple scenes are open, the settings for rendering and navigating the grid are the settings in the main scene. If you want to change the settings of a scene, you must only open one scene and change the settings, or make the relevant scene the main scene and change the settings.

Parameters

param_nametypedescription

Return

typedescription
Scene

Code Example

typescript
 const main_scene = SceneManager.mainScene;