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

◆ In< T >() [6/7]

static T Sisus.Init.Find.In< T > ( [DisallowNull] GameObject gameObject)
static

Finds object of type T by searching the gameObject .

The GameObject is searched for a Component which is of type T , derives from type T or implements an interface of type T .

Objects wrapped by IWrapper<T> components are also considered in the search.

Template Parameters
TType of the object to find.

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

Parameters
gameObjectThe GameObject to search.
Returns
T instance, if found; otherwise, null.