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

Function GetScripts

Source/Engine/Level/Level.cpp:1946–1956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1944 }
1945
1946 void GetScripts(const MClass* type, bool isInterface, Actor* actor, Array<Script*>& result)
1947 {
1948 for (auto script : actor->Scripts)
1949 {
1950 if ((!isInterface && script->GetClass()->IsSubClassOf(type)) ||
1951 (isInterface && script->GetClass()->HasInterface(type)))
1952 result.Add(script);
1953 }
1954 for (auto child : actor->Children)
1955 GetScripts(type, isInterface, child, result);
1956 }
1957}
1958
1959Array<Actor*> Level::GetActors(const MClass* type, bool activeOnly)

Callers 1

GetScriptsMethod · 0.70

Calls 4

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

Tested by

no test coverage detected