How to run logic when all scenes have loaded?

When using the asset, it is useful to check for this as a lot of your projects logic will require another scene to be loaded in order to function correctly. One the best ways to work around the limitation in code is to use an observer pattern in your code where you listen to events in other classes instead of a direct reference where possible. This along with some static elements can make using this asset a lot easier. However you’ll still need to know when all scene are loaded in some places, so here is how you can do that:

PostScenesLoaded Event

The post scenes loaded event is in the MultiSceneManager.cs and runs when all scenes in a scene group have been loaded. This event is using the custom events system for this asset, which you can read about in the scripting api section.

IMultiScene Interfaces

The multi scene interface setup lets you listen in to when the scenes of a group and run logic in a method. These can be ordered using the custom attribute MultiSceneOrdered(x) which functions like the DefaultExecutionOrder(x) attribute in Unity for classes, but on the interface method instead of the whole class. More on this can be found in the scripting api.