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

Function GetChildByPrefabObjectId

Source/Engine/Level/Actor.cpp:47–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45namespace
46{
47 Actor* GetChildByPrefabObjectId(Actor* a, const Guid& prefabObjectId)
48 {
49 Actor* result = nullptr;
50 for (int32 i = 0; i < a->Children.Count(); i++)
51 {
52 if (a->Children[i]->GetPrefabObjectID() == prefabObjectId)
53 {
54 result = a->Children[i];
55 break;
56 }
57 }
58 return result;
59 }
60
61 Script* GetScriptByPrefabObjectId(Actor* a, const Guid& prefabObjectId)
62 {

Callers 1

SerializeMethod · 0.85

Calls 1

CountMethod · 0.45

Tested by

no test coverage detected