Fix nested prefab stack overflow when adding new object to nested prefabs hierarchy

https://github.com/LOOPDISK/FlaxEngine/pull/44
This commit is contained in:
2026-06-02 13:23:21 +02:00
parent 1badeda31c
commit ff526ecafb
5 changed files with 159 additions and 29 deletions
+1 -1
View File
@@ -752,7 +752,7 @@ void SceneObjectsFactory::SynchronizePrefabInstances(Context& context, PrefabSyn
obj->SetOrderInParent(order);
}
// Setup hierarchy for the prefab instances (ensure any new objects are connected)
// Setup hierarchy for the prefab instances (after adding new objects to ensure they are connected, eg. when reparenting existing prefab into a new root)
for (const auto& instance : context.Instances)
{
const auto& prefabStartData = data.Data[instance.StatIndex];