Fix error in reparent action when scene is missing (eg. in prefab editor)

This commit is contained in:
Wojtek Figat
2026-02-03 19:13:31 +01:00
parent 36ab08e60d
commit 3c6838ee35

View File

@@ -134,7 +134,8 @@ namespace FlaxEditor.Actions
var obj = Object.Find<SceneObject>(ref item.ID);
if (obj != null)
{
scenes.Add(obj.Parent.Scene);
if (obj.Parent != null)
scenes.Add(obj.Parent.Scene);
if (obj is Actor actor)
actor.SetParent(newParent, _worldPositionsStays, true);
else