mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-04 00:23:31 +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.UI.Panels;
|
||||||
using UnityExplorer.Runtime;
|
using UnityExplorer.Runtime;
|
||||||
using UniverseLib.Input;
|
using UniverseLib.Input;
|
||||||
|
using UniverseLib.UI;
|
||||||
|
|
||||||
namespace UnityExplorer
|
namespace UnityExplorer
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ namespace UnityExplorer.Inspectors
|
|||||||
private static Vector3 lastMousePos;
|
private static Vector3 lastMousePos;
|
||||||
|
|
||||||
// UIPanel
|
// UIPanel
|
||||||
|
internal static readonly string UIBaseGUID = $"{ExplorerCore.GUID}.MouseInspector";
|
||||||
private UIBase inspectorUIBase;
|
private UIBase inspectorUIBase;
|
||||||
|
|
||||||
public override string Name => "Inspect Under Mouse";
|
public override string Name => "Inspect Under Mouse";
|
||||||
@ -205,7 +206,7 @@ namespace UnityExplorer.Inspectors
|
|||||||
// Create a new canvas for this panel to live on.
|
// 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.
|
// 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);
|
UIRoot.transform.SetParent(inspectorUIBase.RootObject.transform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ namespace UnityExplorer.UI
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
UniversalUI.SetUIActive(ExplorerCore.GUID, value);
|
UniversalUI.SetUIActive(ExplorerCore.GUID, value);
|
||||||
|
UniversalUI.SetUIActive(InspectUnderMouse.UIBaseGUID, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user