- A single component called
Framework
is attached to a permanent GameObject inside every scene in your project.- A Prefab containing the Framework Object is available in the _Prefabs folder for you to use if you wish.
- When a Unity scene is loading the Framework will search first search for an object in your scene named
SceneView
with an attached component to it derived fromSceneView
. If found this will become your scene view context object. If it is not found it will search your project for a component in your project named<YourSceneName>SceneView
. For example if your scene is named Game.Unity the framework will require a component namedGameSceneView
. This component will be automatically attached to a new GameObject which will be namedSceneView
in your hierarchy. - The Framework requires that your
GameSceneView
component is derived from a base class provided in the Framework calledSceneView
. - SceneView has an abstract method named
Initialize()
which you must implement in your derivedGameSceneView
object. It is within this method that you can begin to set up and start your scene. - The Framework has two "namespaces" reserved for storing and manipulating objects in memory.
- Global space
Framework
contains a static accessor available atFramework.Globals
which is the Global space object container. - A Global object will remain alive for the entire duration of your applications lifetime from the moment you create it until the moment the game closes.
- Scene space.
SceneView
's base class contains a property calledSceneObjects
which is the Scene space object container.- A Scene object will remain alive only up until the point where you tell the framework to change scenes.
- Global space
- As
SceneView
is a MonoBehaviour, one common case forInitialize()
would be to immediately begin a Coroutine and then perform your scene creation procedurally in it instead.