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

Function FindPrefabObject

Source/Engine/Networking/NetworkReplicator.cpp:862–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862SceneObject* FindPrefabObject(Actor* a, const Guid& prefabObjectId)
863{
864 if (a->GetPrefabObjectID() == prefabObjectId)
865 return a;
866 for (auto* script : a->Scripts)
867 {
868 if (script->GetPrefabObjectID() == prefabObjectId)
869 return script;
870 }
871 SceneObject* result = nullptr;
872 for (int32 i = 0; i < a->Children.Count() && !result; i++)
873 result = FindPrefabObject(a->Children[i], prefabObjectId);
874 return result;
875}
876
877void SetupObjectSpawnGroupItem(ScriptingObject* obj, Array<SpawnGroup, InlinedAllocation<8>>& spawnGroups, SpawnItem& spawnItem)
878{

Callers 1

InvokeObjectSpawnFunction · 0.85

Calls 1

CountMethod · 0.45

Tested by

no test coverage detected