Fix custom editor window restore after hot-reload

#1208
This commit is contained in:
Wojtek Figat
2023-06-28 18:46:46 +02:00
parent 5e5ee8e039
commit ac54838eea

View File

@@ -3,7 +3,6 @@
using FlaxEditor.CustomEditors;
using FlaxEditor.Windows;
using FlaxEngine.GUI;
using FlaxEngine;
using DockState = FlaxEditor.GUI.Docking.DockState;
namespace FlaxEditor
@@ -86,8 +85,12 @@ namespace FlaxEditor
if (!FlaxEngine.Scripting.IsTypeFromGameScripts(type))
return;
Editor.Instance.Windows.AddToRestore(this);
if (!Window.IsHidden)
{
Editor.Instance.Windows.AddToRestore(this);
}
Window.Close();
Window.Dispose();
}
/// <summary>