| 1561 | } |
| 1562 | |
| 1563 | Actor* 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 | |
| 1583 | Actor* Actor::FindActor(const MClass* type, bool activeOnly) const |
| 1584 | { |
no test coverage detected