Defer loading XML documentation during while loading the editor
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
Continuous Deployment / Editor (Windows) (push) Has been cancelled
Continuous Deployment / Game (Windows) (push) Has been cancelled
Continuous Deployment / Editor (Linux) (push) Has been cancelled
Continuous Deployment / Game (Linux) (push) Has been cancelled
Continuous Deployment / Editor (Mac) (push) Has been cancelled
Continuous Deployment / Game (Mac) (push) Has been cancelled

This commit is contained in:
2025-05-02 14:03:14 +03:00
parent ebe906a47a
commit 0b007ef5c9

View File

@@ -325,6 +325,7 @@ namespace FlaxEditor.CustomEditors
}
private bool _buildOnUpdate;
private bool _initialized;
private bool _readOnly;
/// <summary>
@@ -412,6 +413,7 @@ namespace FlaxEditor.CustomEditors
ClearLayout();
_buildOnUpdate = false;
_initialized = true;
Editor.Setup(this);
Panel.IsLayoutLocked = false;
@@ -488,7 +490,11 @@ namespace FlaxEditor.CustomEditors
/// </summary>
protected virtual void OnSelectionChanged()
{
BuildLayout();
// Defer building the layout after we have initialized to improve initial loading times
if (!_initialized)
_buildOnUpdate = true;
else
BuildLayout();
SelectionChanged?.Invoke();
}