StrangeIoC
0.6.0
The IoC/Binding Framework for Unity3D and C#
|
Parent class for all your Views. More...
Protected Member Functions | |
virtual void | Awake () |
A MonoBehaviour Awake handler. More... | |
virtual void | Start () |
A MonoBehaviour Start handler If the View is not yet registered with the Context, it will attempt to connect again at this moment. More... | |
virtual void | OnDestroy () |
A MonoBehaviour OnDestroy handler The View will inform the Context that it is about to be destroyed. More... | |
virtual void | bubbleToContext (MonoBehaviour view, bool toAdd, bool finalTry) |
Recurses through Transform.parent to find the GameObject to which ContextView is attached Has a loop limit of 100 levels. More... | |
Protected Attributes | |
bool | registerWithContext = true |
A flag for allowing the View to register with the Context In general you can ignore this. More... | |
Properties | |
bool | requiresContext [get, set] |
virtual bool | autoRegisterWithContext [get, set] |
bool | registeredWithContext [get, set] |
Properties inherited from strange.extensions.mediation.api.IView | |
bool | requiresContext [get, set] |
Indicates whether the View can work absent a context. More... | |
bool | registeredWithContext [get, set] |
Indicates whether this View has been registered with a Context. | |
bool | autoRegisterWithContext [get] |
Exposure to code of the registerWithContext (Inspector) boolean. If false, the View won't try to register. | |
Parent class for all your Views.
Extends MonoBehaviour. Bubbles its Awake, Start and OnDestroy events to the ContextView, which allows the Context to know when these critical moments occur in the View lifecycle.
|
inlineprotectedvirtual |
A MonoBehaviour Awake handler.
The View will attempt to connect to the Context at this moment.
|
inlineprotectedvirtual |
Recurses through Transform.parent to find the GameObject to which ContextView is attached Has a loop limit of 100 levels.
By default, raises an Exception if no Context is found.
|
inlineprotectedvirtual |
A MonoBehaviour OnDestroy handler The View will inform the Context that it is about to be destroyed.
|
inlineprotectedvirtual |
A MonoBehaviour Start handler If the View is not yet registered with the Context, it will attempt to connect again at this moment.
|
protected |
A flag for allowing the View to register with the Context In general you can ignore this.
But some developers have asked for a way of disabling View registration with a checkbox from Unity, so here it is. If you want to expose this capability either (1) uncomment the commented-out line immediately below, or (2) subclass View and override the autoRegisterWithContext method using your own custom (public) field.