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

◆ Init< TComponent, TFirstArgument, TSecondArgument >()

static TComponent Sisus.Init.GameObjectT1Extensions.Init< TComponent, TFirstArgument, TSecondArgument > ( this GameObject< TComponent > @ this,
TFirstArgument firstArgument,
TSecondArgument secondArgument )
static

Initializes the added component with two arguments.

Template Parameters
TComponentType of the added component.
TFirstArgumentType of the first argument.
TSecondArgumentType of the second 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.
Returns
The initialized component.
Exceptions
InitArgumentsNotReceivedExceptionThrown if TComponent class does not implement IInitializable<TFirstArgument, TSecondArgument> and did receive the arguments during initialization.
Type Constraints
TComponent :Component 
TComponent :IArgs 
TComponent :TFirstArgument 
TComponent :TSecondArgument