| 620 | } |
| 621 | |
| 622 | bool FindCyclicReferences(Actor* actor, const Guid& prefabRootId) |
| 623 | { |
| 624 | for (int32 i = 0; i < actor->Children.Count(); i++) |
| 625 | { |
| 626 | const auto child = actor->Children[i]; |
| 627 | |
| 628 | if (child->GetPrefabObjectID() == prefabRootId || FindCyclicReferences(child, prefabRootId)) |
| 629 | return true; |
| 630 | } |
| 631 | |
| 632 | return false; |
| 633 | } |
| 634 | |
| 635 | bool Prefab::ApplyAll(Actor* targetActor) |
| 636 | { |