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

◆ Wrapper< TWrapped >()

static IWrapper Sisus.Init.Find.Wrapper< TWrapped > ( bool includeInactive = false)
static

Returns component which wraps an object of type TWrapped .

Parameters
includeInactiveShould components on inactive GameObjects be included in the search?
Template Parameters
TWrappedType of the object to find.

Objects match the search criteria if their class is of type TWrapped , if their class derives from a base class of type TWrapped , or their class implements an interface of type TWrapped .

Only objects whose classes derive from Component or ScriptableObject or objects that are wrapped by a IWrapper<T> can be returned.

Returns
Component of type WrapperOf<TWrapped>, if found; otherwise, null