What are Scene Groups & how to set them up?

A scene group, denoted by the icon on the right is a scriptable object that holds a collection of scenes to load together. The groups are the main way to load scenes in the asset. The asset provides a custom inspector to make setting up a group super easy.

๐Ÿ‘œ Creating a group

You can create a new scene group via the create asset menu.

Create โ†’ Carter Games โ†’ Multi Scene โ†’ New Scene Group

You can store the asset generated anywhere in the project. The name of the asset will be the default label for the button in the Multi Scene Group Loader Window.

๐ŸŸฃ Setup a group

The setup a scene group you will need to select a main scene. This scene acts as the active scene as far a Unity is concerned and all object instantiations etc will go to this scene by default. It is also the first scene of a group that is loaded.

To add a main scene, press the add main scene button:

This opens up a new section with a dropdown to let you select a scene, simply select a scene from the dropdown to set the main scene for this group. If you donโ€™t see your scene here you will need to add it to the build settings for it to show up.

Once a valid scene is selected you can then select additive scenes to also load with the main scene in this group. This also makes the scene group valid so it can be loaded via the Multi Scene Group Loader Window & the tools section of the scene group itself. To add more scenes press the add additive scene button.

This will add a new field which you can select another scene from. If you select a scene already selected in this group, it will become invalid until you correct the issue. You can add use the + & – buttons next to any additive scene field to add or remove scenes from the group.

๐ŸŸฃ Full Breakdown

Scene groups have a custom inspector to make things easier to manage, here is a breakdown of all the other options in a scene group and what they do.

Meta Data

The meta data section of the group controls how the group is displayed in the Multi Scene Group Loader Window. Below is what each option does:

Group Name

Defines the group category the scene group shows under in the loader window. If left as unassigned it will show in the No Category section on the loader window.

Order In Group

Defines the order this scene group is displayed in the category. This works just like any other scripting ordering with negative being first & positive being last.

Button Label

Defines the label the scene group is shown as in the loader window. If left blank it will use the scene group file name instead.

Button Colour

Defines the colour of the button in the loader window.

Tools

The tools section contains any extra editor functions that may be handy for the scene group. In this case it provides the option to just load the group you have selected in the editor when pressed.

โ„น๏ธ Note the button will be disabled if the scene group is not valid or if you are in play mode in the editor.

Danger Zone

As the name suggests, this section is risky to use by accident. Currently there is only the option to reset the scene group here. Doing so will reset all the scenes selected but the meta data will remain as set. There is an additional dialogue that will appear like seen below to make sure you donโ€™t press this by accident.