![]() |
Init(args)
Scripting Reference
|
Represents an object which can receive an argument of type TArgument as part of its initialization process.
Represents an object which can receive five arguments as part of its initialization process.
Represents an object which can receive four arguments as part of its initialization process.
Represents an object which can receive three arguments as part of its initialization process.
Represents an object which can receive two arguments as part of its initialization process.
Object-derived classes that implement this interface can be instantiated with their dependency using the ObjectExtensions.Instantiate<TObject, TArgument> function.
MonoBehaviour-derived classes that implement this interface can be added to a GameObject with their dependency using the GameObject.AddComponent{TComponent, TArgument} function.
If the class also implements IInitializable<TArgument> then these functions can automatically inject the dependency to the IInitializable<TArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
If the class does not implement IArgs<TArgument>, or if you you would like to retrieve the dependency at an earlier stage of the initialization process, you can use InitArgs.TryGet<TArgument>.
TArgument | Type of the argument. |
Object-derived classes that implement this interface can be instantiated with their dependency using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject GameObjectExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument> function.
If the class also implements IInitializable<TFirstArgument, TSecondArgument> then these functions can automatically inject the dependency to the IInitializable<TFirstArgument, TSecondArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.
If the class does not implement IArgs<TFirstArgument, TSecondArgument>, or if you you would like to retrieve the dependency at an earlier stage of the initialization process, you can use InitArgs.TryGet<TFirstArgument, TSecondArgument>.
TFirstArgument | Type of the first argument. |
TSecondArgument | Type of the second argument. |
Object-derived classes that implement this interface can be instantiated with their dependency using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with their dependency using the GameObjectExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument, TThirdArgument> function.
If the class also implements IInitializable<TFirstArgument, TSecondArgument, TThirdArgument> then these functions can automatically inject the dependency to 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.
If the class does not implement IArgs<TFirstArgument, TSecondArgument, TThirdArgument>, or if you you would like to retrieve the dependency at an earlier stage of the initialization process, you can use InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument>.
TFirstArgument | Type of the first argument. |
TSecondArgument | Type of the second argument. |
TThirdArgument | Type of the third argument. |
Object-derived classes that implement this interface can be instantiated with their dependency using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with their dependency using the GameObjectExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument> function.
If the class also implements IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument> then these functions can automatically inject the dependency to 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.
If the class does not implement IArgs<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>, or if you you would like to retrieve the dependency at an earlier stage of the initialization process, you can use InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>.
TFirstArgument | Type of the first argument. |
TSecondArgument | Type of the second argument. |
TThirdArgument | Type of the third argument. |
TFourthArgument | Type of the fourth argument. |
Object-derived classes that implement this interface can be instantiated with their dependency using the function. MonoBehaviour-derived classes that implement this interface can be added to a GameObject with their dependency using the GameObjectExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument> function.
If the class also implements IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument> then these functions can automatically inject the dependency to 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.
If the class does not implement IArgs<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument>, or if you you would like to retrieve the dependency at an earlier stage of the initialization process, you can use InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument>.
TFirstArgument | Type of the first argument. |
TSecondArgument | Type of the second argument. |
TThirdArgument | Type of the third argument. |
TFourthArgument | Type of the fourth argument. |
TFifthArgument | Type of the fifth argument. |