diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index 4497fcd..c0d8dc8 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -10,6 +10,7 @@ using UnityExplorer.ObjectExplorer; using UnityExplorer.UI.Panels; using UnityExplorer.Runtime; using UniverseLib.Input; +using UniverseLib.UI; namespace UnityExplorer { diff --git a/src/Inspectors/InspectUnderMouse.cs b/src/Inspectors/InspectUnderMouse.cs index c463014..9da3d7f 100644 --- a/src/Inspectors/InspectUnderMouse.cs +++ b/src/Inspectors/InspectUnderMouse.cs @@ -41,6 +41,7 @@ namespace UnityExplorer.Inspectors private static Vector3 lastMousePos; // UIPanel + internal static readonly string UIBaseGUID = $"{ExplorerCore.GUID}.MouseInspector"; private UIBase inspectorUIBase; public override string Name => "Inspect Under Mouse"; @@ -205,7 +206,7 @@ namespace UnityExplorer.Inspectors // Create a new canvas for this panel to live on. // It needs to always be shown on the main display, other panels can move displays. - inspectorUIBase = UniversalUI.RegisterUI($"{ExplorerCore.GUID}.MouseInspector", null); + inspectorUIBase = UniversalUI.RegisterUI(UIBaseGUID, null); UIRoot.transform.SetParent(inspectorUIBase.RootObject.transform); } } diff --git a/src/UI/UIManager.cs b/src/UI/UIManager.cs index b10a24a..7d3b3bc 100644 --- a/src/UI/UIManager.cs +++ b/src/UI/UIManager.cs @@ -69,6 +69,7 @@ namespace UnityExplorer.UI return; UniversalUI.SetUIActive(ExplorerCore.GUID, value); + UniversalUI.SetUIActive(InspectUnderMouse.UIBaseGUID, value); } }