Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit a95d91c

Browse files
committed
Fix hidden UiBase not being deactivated with main one
1 parent 177b78f commit a95d91c

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/ExplorerCore.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using UnityExplorer.UI.Panels;
1111
using UnityExplorer.Runtime;
1212
using UniverseLib.Input;
13+
using UniverseLib.UI;
1314

1415
namespace UnityExplorer
1516
{

src/Inspectors/InspectUnderMouse.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class InspectUnderMouse : UIPanel
4141
private static Vector3 lastMousePos;
4242

4343
// UIPanel
44+
internal static readonly string UIBaseGUID = $"{ExplorerCore.GUID}.MouseInspector";
4445
private UIBase inspectorUIBase;
4546

4647
public override string Name => "Inspect Under Mouse";
@@ -205,7 +206,7 @@ public override void ConstructPanelContent()
205206
// Create a new canvas for this panel to live on.
206207
// It needs to always be shown on the main display, other panels can move displays.
207208

208-
inspectorUIBase = UniversalUI.RegisterUI($"{ExplorerCore.GUID}.MouseInspector", null);
209+
inspectorUIBase = UniversalUI.RegisterUI(UIBaseGUID, null);
209210
UIRoot.transform.SetParent(inspectorUIBase.RootObject.transform);
210211
}
211212
}

src/UI/UIManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public static bool ShowMenu
6969
return;
7070

7171
UniversalUI.SetUIActive(ExplorerCore.GUID, value);
72+
UniversalUI.SetUIActive(InspectUnderMouse.UIBaseGUID, value);
7273
}
7374
}
7475

0 commit comments

Comments
 (0)