From d0ad0859ead2b8814ca31be9835e702a143d9fba Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Wed, 2 Apr 2025 22:45:07 -0500 Subject: [PATCH] Add unlock selection switch for prefab. --- Source/Editor/Windows/Assets/PrefabWindow.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Windows/Assets/PrefabWindow.cs b/Source/Editor/Windows/Assets/PrefabWindow.cs index 1d1ccc50a..fd1ad0596 100644 --- a/Source/Editor/Windows/Assets/PrefabWindow.cs +++ b/Source/Editor/Windows/Assets/PrefabWindow.cs @@ -45,6 +45,8 @@ namespace FlaxEditor.Windows.Assets private DateTime _modifiedTime = DateTime.MinValue; private bool _isDropping = false; + private bool _lockSelection = false; + /// /// Gets the prefab hierarchy tree control. /// @@ -76,7 +78,18 @@ namespace FlaxEditor.Windows.Assets /// /// Indication of if the prefab window selection is locked on specific objects. /// - public bool LockSelectedObjects = false; + public bool LockSelectedObjects + { + get => _lockSelection; + set + { + if (_lockSelection == value) + return; + _lockSelection = value; + if (!value) + OnSelectionChanged(Graph.Root.SceneContext.Selection.ToArray()); + } + } /// /// Gets or sets a value indicating whether use live reloading for the prefab changes (applies prefab changes on modification by auto).