![]() |
Init(args)
Scripting Reference
|
Represents an object which can be initialized using an argument of type TArgument .
Represents an object which can be initialized using five arguments.
Represents an object which can be initialized using four arguments.
Represents an object which can be initialized using three arguments.
Represents an object which can be initialized using two arguments.
Object-derived classes that implement this interface can be instantiated with an argument using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with an argument using the GameObject.AddComponent function.
These functions can automatically inject the argument using the IInitializable<TArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
It is also possible for the object to retrieve the argument at any earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TArgument>.
Object-derived classes that implement this interface can be instantiated with arguments using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with arguments using the GameObject.AddComponent function.
These functions can automatically inject the arguments using the IInitializable<TFirstArgument, TSecondArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
It is also possible for the object to retrieve the arguments at any earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TFirstArgument, TSecondArgument>.
TFirstArgument | Type of the first argument passed to the Init function. |
TSecondArgument | Type of the second argument passed to the Init function. |
Object-derived classes that implement this interface can be instantiated with arguments using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with arguments using the GameObject.AddComponent function.
These functions can automatically inject the arguments using the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
It is also possible for the object to retrieve the arguments at any earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument>.
TFirstArgument | Type of the first argument passed to the Init function. |
TSecondArgument | Type of the second argument passed to the Init function. |
TThirdArgument | Type of the third argument passed to the Init function. |
Object-derived classes that implement this interface can be instantiated with arguments using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with arguments using the GameObject.AddComponent function.
These functions can automatically inject the arguments using the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
It is also possible for the object to retrieve the arguments at any earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>.
TFirstArgument | Type of the first argument passed to the Init function. |
TSecondArgument | Type of the second argument passed to the Init function. |
TThirdArgument | Type of the third argument passed to the Init function. |
TFourthArgument | Type of the fourth argument passed to the Init function. |
Object-derived classes that implement this interface can be instantiated with arguments using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with arguments using the GameObject.AddComponent function.
These functions can automatically inject the arguments using the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
It is also possible for the object to retrieve the arguments at any earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument>.
TFirstArgument | Type of the first argument passed to the Init function. |
TSecondArgument | Type of the second argument passed to the Init function. |
TThirdArgument | Type of the third argument passed to the Init function. |
TFourthArgument | Type of the fourth argument passed to the Init function. |
TFifthArgument | Type of the fifth argument passed to the Init function. |
Public Member Functions | |
void | Init (TArgument argument) |
Initializes the object with an object that it depends on. More... | |
void | Init (TFirstArgument firstArgument, TSecondArgument secondArgument) |
Initializes the object with two objects that it depends on. More... | |
void | Init (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument) |
Initializes the object with three objects that it depends on. More... | |
void | Init (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument) |
Initializes the object with four objects that it depends on. More... | |
void | Init (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument) |
Initializes the object with five objects that it depends on. More... | |