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

Function GetActors

Source/Engine/Level/Level.cpp:1935–1944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1933namespace
1934{
1935 void GetActors(const MClass* type, bool isInterface, Actor* actor, bool activeOnly, Array<Actor*>& result)
1936 {
1937 if (activeOnly && !actor->GetIsActive())
1938 return;
1939 if ((!isInterface && actor->GetClass()->IsSubClassOf(type)) ||
1940 (isInterface && actor->GetClass()->HasInterface(type)))
1941 result.Add(actor);
1942 for (auto child : actor->Children)
1943 GetActors(type, isInterface, child, activeOnly, result);
1944 }
1945
1946 void GetScripts(const MClass* type, bool isInterface, Actor* actor, Array<Script*>& result)
1947 {

Callers 1

GetActorsMethod · 0.70

Calls 4

IsSubClassOfMethod · 0.45
GetClassMethod · 0.45
HasInterfaceMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected