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

◆ AllInParents()

static object[] Sisus.Init.Find.AllInParents ( [DisallowNull] GameObject gameObject,
[DisallowNull] Type type,
bool includeInactive = false )
static

Returns all components of the given type attached to the gameObject or any GameObject in its parent chain.

Parameters
typeType of the objects to find.

This can be the exact type of an object, any type derived by it or the type of any interface it implements.

Can also be the type of a wrapped object, in which case it will try to find all wrappers for objects of that type from the loaded scenes.

Parameters
includeInactiveShould components on inactive GameObjects be included in the search?
Returns
Array of zero or more objects of type T .