mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-23 01:59:40 +08:00
Fix hidden UiBase not being deactivated with main one
This commit is contained in:
parent
177b78f4e7
commit
a95d91c824
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user