- A single component called
Frameworkis 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
SceneViewwith 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 namedSceneViewin your hierarchy. - The Framework requires that your
GameSceneViewcomponent is derived from a base class provided in the Framework calledSceneView. - SceneView has an abstract method named
Initialize()which you must implement in your derivedGameSceneViewobject. 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
Frameworkcontains a static accessor available atFramework.Globalswhich 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 calledSceneObjectswhich 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
SceneViewis a MonoBehaviour, one common case forInitialize()would be to immediately begin a Coroutine and then perform your scene creation procedurally in it instead.