mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 09:58:02 +08:00
Fix hidden UiBase not being deactivated with main one
This commit is contained in:
1 parent
177b78f4e7
commit
a95d91c824
3 files changed
+4
-1
No files matched your search
@@ -10,6 +10,7 @@ using UnityExplorer.ObjectExplorer;
|
||||
using UnityExplorer.UI.Panels;
|
||||
using UnityExplorer.Runtime;
|
||||
using UniverseLib.Input;
|
||||
using UniverseLib.UI;
|
||||
|
||||
namespace UnityExplorer
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace UnityExplorer.UI
|
||||
return;
|
||||
|
||||
UniversalUI.SetUIActive(ExplorerCore.GUID, value);
|
||||
UniversalUI.SetUIActive(InspectUnderMouse.UIBaseGUID, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user