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

◆ Init1< TFirstComponent, TSecondComponent, TSecondArgument, TThirdArgument, TFourthArgument >()

static UninitializedGameObject< TFirstComponent, TSecondComponent > Sisus.Init.GameObjectT2Extensions.Init1< TFirstComponent, TSecondComponent, TSecondArgument, TThirdArgument, TFourthArgument > ( this GameObject< TFirstComponent, TSecondComponent > @ this,
Second firstArgument,
TSecondArgument secondArgument,
TThirdArgument thirdArgument,
TFourthArgument fourthArgument )
static

Initialize the first added component of type TFirstComponent using four arguments with the second added component being the first one.

Template Parameters
TFirstComponentType of the first added component.
TSecondComponentType of the second added component.
TSecondArgumentType of the second argument.
TThirdArgumentType of the third argument.
TFourthArgumentType of the fourth argument.
Parameters
thisnew GameObject being initialized.
firstArgumentThe Second.Component token informing that the second added component should be used as the first argument when calling the first added component's Init function.
secondArgumentThe second argument passed to the first added component's Init function.
thirdArgumentThe third argument passed to the first added component's Init function.
fourthArgumentThe fourth argument passed to the first added component's Init function.
Returns
Partially initialized GameObject still requiring Init2 to be called until it is ready for usage.
Exceptions
InitArgumentsNotReceivedExceptionThrown if TFirstComponent class does not implement IInitializable<TSecondComponent, TSecondArgument, TThirdArgument, TFourthArgument> and did receive the arguments during initialization.
Type Constraints
TFirstComponent :Component 
TFirstComponent :IFourArguments 
TFirstComponent :ISecondArgument<TSecondArgument> 
TFirstComponent :IThirdArgument<TThirdArgument> 
TFirstComponent :IFourthArgument<TFourthArgument> 
TSecondComponent :Component