![]() |
Init(args)
Scripting Reference
|
◆ GameObject() [1/24]
Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . The components must be initialized by first calling an Init1 function with arguments matching the argument list defined by the IArgs interface that TFirstComponent implements and then calling an Init2 function with arguments matching the argument list defined by the IArgs interface that TSecondComponent implements and then calling an Init3 function with arguments matching the argument list defined by the IArgs interface that TThirdComponent implements. The new GameObject is first created in an inactive state and only activated once both components have been initialized. This ensures that the Awake and OnEnable event functions for the components are only called after both components have been added and initialized with their dependencies.
|