Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ Init2< TFirstComponent, TSecondComponent, TThirdComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument >()

static GameObjectWithInit2Of3Done< TFirstComponent, TSecondComponent, TThirdComponent > Sisus.Init.GameObjectT3Extensions.Init2< TFirstComponent, TSecondComponent, TThirdComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > ( this GameObjectWithInit1Of3Done< TFirstComponent, TSecondComponent, TThirdComponent > @ this,
TFirstArgument firstArgument,
TSecondArgument secondArgument,
TThirdArgument thirdArgument,
TFourthArgument fourthArgument )
static

Initialize the second added component of type TSecondComponent using the four provided arguments.

Template Parameters
TFirstComponentType of the first added component.
TSecondComponentType of the second added component.
TThirdComponentType of the third added component.
TFirstArgumentType of the first argument.
TSecondArgumentType of the second argument.
TThirdArgumentType of the third argument.
TFourthArgumentType of the fourth argument.
Parameters
thisnew GameObject being initialized.
firstArgumentThe first argument passed to the second added component's Init function.
secondArgumentThe second argument passed to the second added component's Init function.
thirdArgumentThe third argument passed to the second added component's Init function.
fourthArgumentThe fourth argument passed to the second added component's Init function.
Returns
Partially initialized GameObject still requiring Init3 to be called until it is ready for usage.
Exceptions
InitArgumentsNotReceivedExceptionThrown if TSecondComponent class does not implement IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument> and did not receive the arguments during its initialization.
Type Constraints
TFirstComponent :Component 
TSecondComponent :Component 
TSecondComponent :IArgs 
TSecondComponent :TFirstArgument 
TSecondComponent :TSecondArgument 
TSecondComponent :TThirdArgument 
TSecondComponent :TFourthArgument 
TThirdComponent :Component