Dispatching Unity's Lifecycle events
VContainer has own PlayerLoop sub systems.
If you register a class that implements the marker interface, it will be scheduled in Unity's PlayerLoop cycle.
Since it uses PlayerLoopSystem, it works even if you register at any time (e.g: IInitilizable
etc)
The following interfaces and timings are available.
IInitializable
: NearlyStart
IPostInitializable
: AfterStart
IFixedTickable
: NearlyFixedUpdate
IPostFixedTickable
: AfterFixedUpdate
ITickable
: NearlyUpdate
IPostTickable
: AfterUpdate
ILateTickable
: NearlyLateUpdate
IPostLateTickabl
: AfterLateUpdate
And
IDisposable
: With container disposes. (ForLifetime.Scoped
)