Add locking scene selection in properties window.

This commit is contained in:
Chandler Cox
2024-04-12 07:33:09 -05:00
parent 0b0115aa10
commit 1bc7455e09
2 changed files with 26 additions and 0 deletions

View File

@@ -37,6 +37,11 @@ namespace FlaxEditor.Windows
/// </summary>
public bool UIPivotRelative = true;
/// <summary>
/// Indication of if the properties window is locked on specific objects.
/// </summary>
public bool LockObjects = false;
/// <summary>
/// Initializes a new instance of the <see cref="PropertiesWindow"/> class.
/// </summary>
@@ -62,6 +67,9 @@ namespace FlaxEditor.Windows
private void OnSelectionChanged()
{
if (LockObjects)
return;
// Update selected objects
// TODO: use cached collection for less memory allocations
undoRecordObjects = Editor.SceneEditing.Selection.ConvertAll(x => x.UndoRecordObject).Distinct();