Defer loading XML documentation during while loading the editor
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user