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

◆ Init< TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument >()

static TComponent Sisus.Init.GameObjectT1Extensions.Init< TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument > ( this GameObject< TComponent > @ this,
TFirstArgument firstArgument,
TSecondArgument secondArgument,
TThirdArgument thirdArgument,
TFourthArgument fourthArgument,
TFifthArgument fifthArgument )
static

Initializes the added component with five arguments.

Template Parameters
TComponentType of the added component.
TFirstArgumentType of the first argument.
TSecondArgumentType of the second argument.
TThirdArgumentType of the third argument.
TFourthArgumentType of the fourth argument.
TFifthArgumentType of the fifth argument.
Parameters
thisnew GameObject being initialized.
firstArgumentThe first argument passed to the added component's Init function.
secondArgumentThe second argument passed to the added component's Init function.
thirdArgumentThe third argument passed to the added component's Init function.
fourthArgumentThe fourth argument passed to the added component's Init function.
fifthArgumentThe fifth argument passed to the added component's Init function.
Returns
The initialized component.
Exceptions
InitArgumentsNotReceivedExceptionThrown if TComponent class does not implement IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument> and did receive the arguments during initialization.
Type Constraints
TComponent :Component 
TComponent :IArgs 
TComponent :TFirstArgument 
TComponent :TSecondArgument 
TComponent :TThirdArgument 
TComponent :TFourthArgument 
TComponent :TFifthArgument