Manage scenes
BeginnerProgrammerDesigner root scene at the top. This hierarchy is displayed in the Entity Tree in the Scene Editor on the left. The root scene contains all the scenes and entities in your game. It should contain common entities that the other scenes and entities use, such as game logic scripts. Scenes are kept in different folders. This means that different people can work on them without overwriting each other’s work.
Note
child scenes aren’t automatically loaded too. You have to load child scenes in code. For more information, see Load scenes.
Set parent and child scenes
The relationship between parent and child scenes is set on the child, not the parent. In other words, child scenes know about their parent scenes, but parent scenes don’t know about their child scenes. There are several ways to make a scene a child of another scene:
- Entity Tree (left by default), drag the scene onto the scene you want to make its parent.
- Asset View (bottom by default) onto the scene you want to make its parent in the Entity Tree.
- Property Grid (on the right by default), next to Parent, specify the scene you want to be the scene’s parent.
Set the default scene
default scene is the scene Xenko loads at runtime. You can set this in the Game Settings asset. - Solution Explorer (the bottom-left pane by default), select the Assets folder.
- Asset View (the bottom pane by default), select the GameSettings asset.
- Property Grid (the right-hand pane by default), next to Default Scene, click (Select an asset). Select an asset window opens.
- OK.
Xenko loads this scene at runtime.
Game Settings.
Set the active scene
active scene is the scene entities are added to when you drop them in the Scene Editor. Game Studio adds the entities as children to the active scene. Entity Tree (left by default), right-click the scene and select active scene. The active scene has no effect on runtime.Lock scenes and entities
You can lock scenes and entities so they can’t be selected in the main window. This is useful when you have lots of things in your scene. You can still select scenes and entities in the Entity Tree. padlock icon.Tip
Ctrl and click the padlock icon. gold locked padlock icon in the Entity Tree.Load and unload scenes in the Scene Editor
You can load and unload scenes (with all their child scenes and entities) in the Scene Editor. Unloading scenes in the editor is useful if, for example, you want to remove clutter from your editing view, or improve editor performance. skybox, scripts, asteroids, and player character. The child scenes are sections of level. Scene Editor, in the Entity Tree on the left, next to the scene you want to load or unload, click the eye icon.Move a scene
offset property. To move a scene at runtime, use:myScene.Offset = new Vector3(x, y, z);myScenewith the name of the scene, andx,y,zwith the XYZ coordinates you want to move the scene to.See also
- Create and open a scene
- Navigate in the Scene Editor
- Load scenes
- Add entities
- Manage entities
