|
|
◆ Init()
| void Sisus.Init.MonoBehaviour< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument >.Init |
( |
TFirstArgument | firstArgument, |
|
|
TSecondArgument | secondArgument, |
|
|
TThirdArgument | thirdArgument, |
|
|
TFourthArgument | fourthArgument, |
|
|
TFifthArgument | fifthArgument, |
|
|
TSixthArgument | sixthArgument, |
|
|
TSeventhArgument | seventhArgument, |
|
|
TEighthArgument | eighthArgument, |
|
|
TNinthArgument | ninthArgument, |
|
|
TTenthArgument | tenthArgument, |
|
|
TEleventhArgument | eleventhArgument ) |
|
abstractprotected |
Provides the Component with the objects that it depends on.
You can think of the Init method as a parameterized constructor alternative for the component.
Init get called when the script is being loaded, before the OnAwake, OnEnable and Start events when the component is created using InstantiateExtensions.Instantiate<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument> or AddComponentExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument>.
In edit mode Init can also get called during the Reset event when the script is added to a GameObject, if the component has the InitOnResetAttribute or RequireComponent attribute for each argument.
Note that Init gets called immediately following object creation even if the GameObject to which the component was added is inactive unlike some other initialization event functions such as Awake and OnEnable.
- Parameters
-
| firstArgument | The first object that this component depends on. |
| secondArgument | The second object that this component depends on. |
| thirdArgument | The third object that this component depends on. |
| fourthArgument | The fourth object that this component depends on. |
| fifthArgument | The fifth object that this component depends on. |
| sixthArgument | The sixth object that this component depends on. |
| seventhArgument | The seventh object that this component depends on. |
| eighthArgument | The eighth object that this component depends on. |
| ninthArgument | The ninth object that this component depends on. |
| tenthArgument | The tenth object that this component depends on. |
| eleventhArgument | The eleventh object that this component depends on. |
Implements Sisus.Init.IInitializable< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument >.
|