MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / TryGetChild

Method TryGetChild

Source/Engine/Level/Actor.cs:165–169  ·  view source on GitHub ↗

Tries to the child actor of the given type. Type of the actor to search for. Includes any actors derived from the type. The returned actor, valid only if method returns true. True if found an child actor of that type or false if failed to find.

(out T actor)

Source from the content-addressed store, hash-verified

163 /// <param name="actor">The returned actor, valid only if method returns true.</param>
164 /// <returns>True if found an child actor of that type or false if failed to find.</returns>
165 public bool TryGetChild<T>(out T actor) where T : Actor
166 {
167 actor = GetChild(typeof(T)) as T;
168 return (object)actor != null;
169 }
170
171 /// <summary>
172 /// Finds the child actor of the given type or creates a new one.

Callers

nothing calls this directly

Calls 1

GetChildFunction · 0.85

Tested by

no test coverage detected