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

◆ Add< TWrapped >()

static Wrapper Sisus.Init.WrapperGameObjectExtensions.Add< TWrapped > ( [DisallowNull] this GameObject gameObject,
TWrapped wrapped )
static

Wraps the plain old class object of type TWrapped in a wrapper component and adds it to the gameObject .

Template Parameters
TWrappedThe type of the object to wrap and add to the gameObject .
Parameters
gameObjectThe GameObject to which the object is added.
wrappedThe object to wrap add to the gameObject .
Returns
The wrapper that was added to the gameObject and was made to wrap the wrapped object.
Exceptions
ArgumentNullExceptionThrown if this GameObject or the wrapped is null.