![]() |
Init(args)
Scripting Reference
|
Represents an object which can be initialized using twelve arguments.
Object-derived classes that implement this interface can be instantiated with an argument using the InstantiateExtensions.Instantiate<TObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument>(TObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument) method.
MonoBehaviour-derived classes that implement this interface can also be added to a GameObject with an argument using the AddComponentExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument>(GameObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument) method.
These functions can automatically inject the arguments using the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument>.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 receive the provided arguments at an earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument>.
TFirstArgument | Type of the first argument accepted by the Init method. |
TSecondArgument | Type of the second argument accepted by the Init method. |
TThirdArgument | Type of the third argument accepted by the Init method. |
TFourthArgument | Type of the fourth argument accepted by the Init method. |
TFifthArgument | Type of the fifth argument accepted by the Init method. |
TSixthArgument | Type of the sixth argument accepted by the Init method. |
TSeventhArgument | Type of the seventh argument accepted by the Init method. |
TEighthArgument | Type of the eighth argument accepted by the Init method. |
TNinthArgument | Type of the ninth argument accepted by the Init method. |
TTenthArgument | Type of the tenth argument accepted by the Init method. |
TEleventhArgument | Type of the eleventh argument accepted by the Init method. |
TTwelfthArgument | Type of the twelfth argument accepted by the Init method. |
Public Member Functions | |
void | Init (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument, TTwelfthArgument twelfthArgument) |
Initializes the object with twelve objects that it depends on. | |
![]() | |
void | Validate (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument, TTwelfthArgument twelfthArgument) |
Validates the initialization arguments that were provided to this client. | |