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

◆ Init< TFirstComponent, TSecondComponent >()

static Components< TFirstComponent, TSecondComponent > Sisus.Init.GameObjectT2Extensions.Init< TFirstComponent, TSecondComponent > ( this GameObject< TFirstComponent, TSecondComponent > @ this)
static

Initializes both added components without any additional arguments.

If the first added component implements IArgs<TSecondComponent> then its Init function will get called with the second added component passed as an argument.

If the second added component implements IArgs<TFirstComponent> then its Init function will get called with the first added component passed as an argument.

Template Parameters
TFirstComponentType of the first added component.
TSecondComponentType of the second added component.
Parameters
thisnew GameObject being initialized.
Returns
Created object which can be cast to GameObject, TFirstComponent , TSecondComponent or System.ValueTuple<TFirstComponent, TSecondComponent>.
Type Constraints
TFirstComponent :Component 
TSecondComponent :Component