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

Function FindActorRecursive

Source/Engine/Level/Level.cpp:1782–1796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1780}
1781
1782Actor* FindActorRecursive(Actor* node, const Tag& tag, bool activeOnly)
1783{
1784 if (activeOnly && !node->GetIsActive())
1785 return nullptr;
1786 if (node->HasTag(tag))
1787 return node;
1788 Actor* result = nullptr;
1789 for (Actor* child : node->Children)
1790 {
1791 result = FindActorRecursive(child, tag, activeOnly);
1792 if (result)
1793 break;
1794 }
1795 return result;
1796}
1797
1798Actor* FindActorRecursiveByType(Actor* node, const MClass* type, const Tag& tag, bool activeOnly)
1799{

Callers 1

FindActorMethod · 0.85

Calls 2

HasTagMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected