Fix changing prefab root

#488 #544 #489
This commit is contained in:
Wojtek Figat
2021-07-09 17:17:21 +02:00
parent 4fee75cf55
commit 7fc3e65849
6 changed files with 142 additions and 64 deletions

View File

@@ -281,7 +281,7 @@ Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary<Guid
const auto prefabObjectId = JsonTools::GetGuid(stream, "ID");
if (objectsCache)
objectsCache->Add(prefabObjectId, dynamic_cast<ScriptingObject*>(obj));
objectsCache->Add(prefabObjectId, obj);
obj->LinkPrefab(prefabId, prefabObjectId);
}