In Cocos Creator, the Scene is the cornerstone for organizing game content during development, and presenting all game content to the players. The Scene itself is a file, also considered a game asset, and saves most of the game's information.
Creating a Scene
There are three ways to create a Scene:
Select the folder where you want to create the Scene file in the Assets. On the folder Right click --> New --> Scene file, and then type the desired Scene name.
In order to have a good directory structure in your project, it is strongly recommend that you use this method to create a Scene.
Click the Create menu in the Assets to create a new Scene.
Select File -> New Scene, a new Scene will appear directly in the Hierarchy panel, but a new Scene will not appear in the Assets. You need to save it in the root of the asset folder. A
New Scene.sceneScene file appears in the directory.
Saving a Scene
While creating Scenes, you can quickly save Scenes with the shortcut keys Ctrl + S (Windows) or Command + S (Mac).
In the Assets, double-click the Scene you want to open. When needing to switch Scenes in the game, use the
director.loadScene() API to implement dynamic scene loading and switching in the game. For further details, please see the API documentation.
Scene Asset Properties
Since the Scene is an Asset a property can be set in the Assets to load assets asynchronously.
After opening the Scene file, Scene is the root node of the Scene node tree. Select the Scene node in the Hierarchy panel. In the Inspector panel on the left, you can set the properties of the entire Scene, including ambient light settings, shadow settings and sky box settings.
For a detailed description of each attribute, see the following documents: