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

◆ Init1< TFirstComponent, TSecondComponent, TFirstArgument >()

static UninitializedGameObject< TFirstComponent, TSecondComponent > Sisus.Init.GameObjectT2Extensions.Init1< TFirstComponent, TSecondComponent, TFirstArgument > ( this GameObject< TFirstComponent, TSecondComponent > @ this,
TFirstArgument firstArgument,
Second secondArgument )
static

Initialize the first added component of type TFirstComponent using the provided argument and the second added component.

Template Parameters
TFirstComponentType of the first added component.
TSecondComponentType of the second added component.
TFirstArgumentType of the first argument.
Parameters
thisnew GameObject being initialized.
firstArgumentThe first argument passed to the first added component's Init function.
secondArgumentThe Second.Component token informing that the second added component should be used as the second argument when calling 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<TFirstArgument, TSecondComponent> and did receive the arguments during initialization.
Type Constraints
TFirstComponent :Component 
TFirstComponent :ITwoArguments 
TFirstComponent :IFirstArgument<TFirstArgument> 
TSecondComponent :Component