Scenes contain all the objects for your app and are a great way to organize the different parts that make up your app.  For example, you can use a new scene for each page of a book, levels in a game, or even the main menu for your app.


App Flow

Scenes are a great way to control the flow of your app. Take a game like Angry Birds for example. The player starts the game, selects their level, and progresses through the game until the game is complete.

If you break this down, each scene can be thought as a state in the game that you progress through like a story.



Constructing a Scene

Scenes are constructed with Objects and Layers.

Objects are graphics, particles, and sounds  which have been dragged on to the Canvas. See Importing Assets for more information on importing different assets.


A layer is simply one set of objects stacked on top of another and provide you a flexible yet simple way to determine what order things are drawn in. Layers also allow you to work on one set of objects without affecting the objects stacked above or below the current layer. You can learn more about the layer system by viewing the Layers help documentation.


Adding a Scene 

You can add a new scene from the Project Menu. Tap the Project Menu icon in the corner to open the menu and view your list of scenes or to add a new scene.

The Project Menu is split in 2 categories. Scenes, and Overlays. When adding a Scene, make sure you are in the Scene section of the Project Menu.

To add a scene, simply tap the "+ Add Scene" button at the top of the list of your existing scenes.

Remember, any object on the Global UI layer will also appear on this new. Global Behaviours and Global Properties will also affect the new scene.


Existing Scenes

Every new project will automatically have a default scene called Scene 1. The list of scenes show up underneath the Add Scene button. You can tap on a scene to load that scene, tap the gear icon to view more options, or press and hold scenes to move them around.
Scene Menu
From the Scene Menu you can modify scene settings like the name, or the option to Preload (see the article on preloading).
You can Duplicate the scene, or delete the scene as well. Note that duplicating, or deleting a scene can not be undone.
Rearranging Scenes
To rearrange the oder of your scenes, you can press and hold your finger on the scene, then drag it up or down to it's new position in the list.


Article is closed for comments.