-
Notifications
You must be signed in to change notification settings - Fork 0
Singletons
Olivia Sculley edited this page Sep 2, 2023
·
2 revisions
Singletons are used in NERVV to provide a single authoritative source of information for each scene. Singletons initialize their references in Awake(), so any static references to singletons must be used in Start() or later according to Unity's order of execution.
-
MachineManager - Keeps track of all the machines in the scene. Any script implementing the IMachine interface must attempt to add itself to the MachineManager in Start() or later by utilizing
AddMachine(this)
and ensuring that it returns true. -
InputManager - Keeps track of all the inputs in the scene. Any script implementing the IInputSource interface must attempt to add itself to the InputManager in Start() or later by utilizing
AddInput(this)
and ensuring that it returns true. -
OutputManager - Keeps track of all the outputs in the scene. Any script implementing the IOutputSource interface must attempt to add itself to the OutputManager in Start() or later by utilizing
AddOutput(this)
and ensuring that it returns true.