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

Function GetScriptByPrefabObjectId

Source/Engine/Level/Actor.cpp:61–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 }
60
61 Script* GetScriptByPrefabObjectId(Actor* a, const Guid& prefabObjectId)
62 {
63 Script* result = nullptr;
64 for (int32 i = 0; i < a->Scripts.Count(); i++)
65 {
66 if (a->Scripts[i]->GetPrefabObjectID() == prefabObjectId)
67 {
68 result = a->Scripts[i];
69 break;
70 }
71 }
72 return result;
73 }
74
75 void LinkPrefab(SceneObject* object, Prefab* linkPrefab)
76 {

Callers 1

SerializeMethod · 0.85

Calls 1

CountMethod · 0.45

Tested by

no test coverage detected