Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ Init() [2/2]

override bool Sisus.Init.MonoBehaviour< TArgument >.Init ( Context context)
protected

Requests the object to try and acquire the object that it depends on and initialize itself.

Parameters
contextThe context from which a method is being called.

Many objects that implement IInitializable are only able to acquire their own dependencies when Context.EditMode or Context.Reset is used in Edit Mode. For performance and reliability reasons it is recommended to do these operations in Edit Mode only, and cache the results.

Returns
true if was able to locate the dependency and initialize itself, or has already successfully initialized itself previously; otherwise, false.

Implements Sisus.Init.IInitializable.