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

◆ WithTag() [2/3]

static bool Sisus.Init.Find.WithTag ( [DisallowNull] string tag,
[NotNullWhen(true), MaybeNullWhen(false)] out GameObject result,
bool includeInactive = false )
static

Returns the first loaded GameObject with the provided tag , if any.

Parameters
tagThe tag to search for.
resultWhen this method returns, contains GameObject with the provided tag, if found; otherwise, null. This parameter is passed uninitialized.
includeInactiveShould inactive GameObjects be included in the search?

Note that searching for inactive GameObjects is a slow operation.

Returns
true if a GameObject was found; otherwise, false.