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

◆ Init< TComponent, TArgument >()

static TComponent Sisus.Init.GameObjectT1Extensions.Init< TComponent, TArgument > ( this GameObject< TComponent > @ this,
TArgument argument )
static

Initializes the added component with one argument.

Template Parameters
TComponentType of the added component.
TArgumentType of the argument.
Parameters
thisnew GameObject being initialized.
argumentThe argument passed to the added component's Init function.
Returns
The initialized component.
Exceptions
InitArgumentsNotReceivedExceptionThrown if TComponent class does not implement IInitializable<TArgument> and did receive the arguments during initialization.
Type Constraints
TComponent :Component 
TComponent :IArgs<TArgument>