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

Method FindActor

Source/Engine/Level/Actor.cpp:1563–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1561}
1562
1563Actor* Actor::FindActor(const StringView& name) const
1564{
1565 Actor* result = nullptr;
1566 if (_name == name)
1567 {
1568 result = const_cast<Actor*>(this);
1569 }
1570 else
1571 {
1572 for (int32 i = 0; i < Children.Count(); i++)
1573 {
1574 result = Children[i]->FindActor(name);
1575 if (result)
1576 break;
1577 }
1578 }
1579
1580 return result;
1581}
1582
1583Actor* Actor::FindActor(const MClass* type, bool activeOnly) const
1584{

Callers 1

TestPrefabs.cppFile · 0.45

Calls 4

GetClassFunction · 0.50
CountMethod · 0.45
IsSubClassOfMethod · 0.45
HasInterfaceMethod · 0.45

Tested by

no test coverage detected