|
Init(args)
Scripting Reference
|
Represents an object which can receive eleven arguments as part of its initialization process.
UnityEngine.Object-derived classes that implement this interface can be instantiated with their dependency using the InstantiateExtensions.Instantiate<TObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument> function.
MonoBehaviour-derived classes that implement this interface can be added to a GameObject with their dependency using the AddComponent function.
If the class also implements IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument> then these functions can automatically inject the dependency to the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument>.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 IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument>, 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, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument>.
| 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. |
| TSixthArgument | Type of the sixth argument. |
| TSeventhArgument | Type of the seventh argument. |
| TEighthArgument | Type of the eighth argument. |
| TNinthArgument | Type of the ninth argument. |
| TTenthArgument | Type of the tenth argument. |
| TEleventhArgument | Type of the eleventh argument. |
Public Member Functions | |
| void | Validate (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument) |
| Validates the initialization arguments that were provided to this client. | |