Scenes

A scene is one screen of the game.

Objects live in a scene. A new project already has one, named Main. You add more when the game has another screen, or when a picture should keep its own colors.

What you already have

File → New Project writes Scenes/Main.wscene and opens it. Click Main in the Hierarchy. The Inspector shows Start Scene checked. The game loads that scene when it starts. A project has one start scene: checking it on another scene unchecks the rest. The start scene always ships in a build.

Make a new scene

  1. File → New Scene. An empty scene named New Scene appears in the Hierarchy, next to the ones already open.
  2. File → Save Scene. The first save opens Save Scene As, and the dialog stays inside the project’s Scenes folder.
  3. Type the name. The file is Scenes/ThatName.wscene, and the scene takes that name.

File → Save Scene As (Ctrl+Shift+S) does the same save when the scene already has a file and you want a second copy. File → Save All (Ctrl+S) saves every open scene and the project.

You can also right-click the scene’s name in the Hierarchy. That menu has New Scene, Save Scene, and Save Scene As...

Open a scene you already saved

  1. File → Open Scene (Ctrl+O).
  2. Pick a .wscene inside the project.

It loads beside the scenes that are already open. It does not replace them. Opening a scene that is already loaded does nothing. A scene file has to live in the project; move it into Scenes/ before you open it.

Right-click the scene’s name and choose Unload Scene to close it. The file stays on disk.

Which scene receives new objects

Click the scene’s name in the Hierarchy so it is the active scene. Create → 2D → Sprite, and the other Create items, put the new object there. Drag a scene file from the Project panel onto empty space in the Hierarchy to open it the same way Open Scene does.

Start scene, build, and draw order

Click the scene’s name. The Inspector has three things you set by hand:

Two scenes can be open together on purpose. A background can be one scene, and the characters another, so each picture keeps its own colors. Give the background a lower Draw Order.

Start Scene and In Build are saved when you click them. The objects in the scene are saved when you Save Scene.

Next: Sheets and animation.