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

Method GetChildren

Source/Engine/Level/Actor.cpp:488–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488Array<Actor*> Actor::GetChildren(const MClass* type) const
489{
490 Array<Actor*> result;
491 if (type->IsInterface())
492 {
493 for (auto child : Children)
494 if (child->GetClass()->HasInterface(type))
495 result.Add(child);
496 }
497 else
498 {
499 for (auto child : Children)
500 if (child->GetClass()->IsSubClassOf(type))
501 result.Add(child);
502 }
503 return result;
504}
505
506void Actor::DestroyChildren(float timeLeft)
507{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected