Core Concepts
There are some key structures that need to be understood in order to dive deep into the logic of the My Scene Manager.
Architecture
This is an overview of the My Scene Manager architecture. We will dive into each individual component in the next pages. Consider this flowchart:
- The
MySceneManageris a static implementation of aCoreSceneManager, which contains all the logic to perform Scene Operations. - The
CoreSceneManageris an implementation of theISceneManagerinterface, that by itself only defines "low-level" Scene Operations methods that receiveSceneParameterarguments. - The
SceneParameterstruct is an abstraction to handle a singleILoadSceneInfoor multiple (ILoadSceneInfo[]). - The
ILoadSceneInfointerface is an abstraction of a reference to a scene. It has the following implementations:LoadSceneInfoName: name or pathLoadSceneInfoIndex: build indexLoadSceneInfoScene: a loaded sceneLoadSceneInfoAddress: an addressable addressLoadSceneInfoAssetReference: anAssetReference
- The Scene Operations called by the
CoreSceneManagerwill useISceneDataimplementations internally, as it stores theILoadSceneInfoused to load a scene and also stores anIAsyncSceneOperationthat can reference both the load or unload operation. - A completed Scene Operation will return a
SceneResultstruct, that can hold a single or multiple scenes, depending on theSceneParametermethod input.
info
Scene Operations refer to the Load, Unload and Transition operations. A Reload operation is considered a Transition operation.
We will cover each of these structures in the next pages.