Fix reparenting inside the nested prefabs when using multiple instanced of the nested prefab in PrefabManager

#690
This commit is contained in:
Wojtek Figat
2022-07-27 09:33:01 +02:00
parent 163704085a
commit 1ef8bb723c
4 changed files with 148 additions and 2 deletions

View File

@@ -152,6 +152,7 @@ Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary<Guid
{
// Synchronize new prefab instances (prefab may have new objects added so deserialized instances need to synchronize with it)
// TODO: resave and force sync prefabs during game cooking so this step could be skipped in game
SceneObjectsFactory::SetupPrefabInstances(context, prefabSyncData);
SceneObjectsFactory::SynchronizeNewPrefabInstances(context, prefabSyncData);
Scripting::ObjectsLookupIdMapping.Set(&modifier.Value->IdsMapping);
}