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

◆ Any() [1/2]

static bool Sisus.Init.Find.Any ( [DisallowNull] Type type,
[NotNullWhen(true), MaybeNullWhen(false)] out object result,
bool includeInactive = false )
static

Returns the first loaded object of type T type.

Parameters
typeType of the object to find.

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

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

Parameters
resultWhen this method returns, contains loaded T instance, if found; otherwise, null. This parameter is passed uninitialized.
includeInactiveShould components on inactive GameObjects be included in the search?
Returns
true if an object was found; otherwise, false.