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

Method GetNestedObject

Source/Engine/Level/Prefabs/Prefab.cpp:97–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool Prefab::GetNestedObject(const Guid& objectId, Guid& outPrefabId, Guid& outObjectId) const
98{
99 if (WaitForLoaded())
100 return false;
101 bool result = false;
102 Guid result1 = Guid::Empty, result2 = Guid::Empty;
103 const ISerializable::DeserializeStream** prefabObjectDataPtr = ObjectsDataCache.TryGet(objectId);
104 if (prefabObjectDataPtr)
105 {
106 const ISerializable::DeserializeStream& prefabObjectData = **prefabObjectDataPtr;
107 result = JsonTools::GetGuidIfValid(result1, prefabObjectData, "PrefabID") &&
108 JsonTools::GetGuidIfValid(result2, prefabObjectData, "PrefabObjectID");
109 }
110 outPrefabId = result1;
111 outObjectId = result2;
112 return result;
113}
114
115void Prefab::DeleteDefaultInstance()
116{

Callers 5

LinkPrefabFunction · 0.80
FromBytesMethod · 0.80
ApplyAllInternalMethod · 0.80
ItemMethod · 0.80
InitializeMethod · 0.80

Calls 1

TryGetMethod · 0.45

Tested by

no test coverage detected