mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
Cleanup runtime-specific
This commit is contained in:
@ -78,11 +78,7 @@ namespace UnityExplorer.UI.Inspectors.GameObjects
|
||||
text.text = SignatureHighlighter.ParseFullSyntax(ReflectionUtility.GetActualType(comp), true);
|
||||
|
||||
var toggle = s_compToggles[i];
|
||||
#if CPP
|
||||
if (comp.TryCast<Behaviour>() is Behaviour behaviour)
|
||||
#else
|
||||
if (comp is Behaviour behaviour)
|
||||
#endif
|
||||
{
|
||||
if (!toggle.gameObject.activeSelf)
|
||||
toggle.gameObject.SetActive(true);
|
||||
@ -109,19 +105,13 @@ namespace UnityExplorer.UI.Inspectors.GameObjects
|
||||
internal static void OnCompToggleClicked(int index, bool value)
|
||||
{
|
||||
var comp = s_compShortlist[index];
|
||||
#if CPP
|
||||
comp.TryCast<Behaviour>().enabled = value;
|
||||
#else
|
||||
(comp as Behaviour).enabled = value;
|
||||
#endif
|
||||
}
|
||||
|
||||
internal static void OnCompListObjectClicked(int index)
|
||||
{
|
||||
if (index >= s_compShortlist.Count || !s_compShortlist[index])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
InspectorManager.Instance.Inspect(s_compShortlist[index]);
|
||||
}
|
||||
|
@ -203,11 +203,6 @@ namespace UnityExplorer.UI.Main.Home
|
||||
position = mousePos
|
||||
};
|
||||
|
||||
#if MONO
|
||||
var list = new List<RaycastResult>();
|
||||
#else
|
||||
var list = new Il2CppSystem.Collections.Generic.List<RaycastResult>();
|
||||
#endif
|
||||
//ExplorerCore.Log("~~~~~~~~~ begin raycast ~~~~~~~~");
|
||||
GameObject hitObject = null;
|
||||
int highestLayer = int.MinValue;
|
||||
@ -215,7 +210,10 @@ namespace UnityExplorer.UI.Main.Home
|
||||
int highestDepth = int.MinValue;
|
||||
foreach (var gr in graphicRaycasters)
|
||||
{
|
||||
gr.Raycast(ped, list);
|
||||
var list = new List<RaycastResult>();
|
||||
RuntimeProvider.Instance.GraphicRaycast(gr, ped, list);
|
||||
|
||||
//gr.Raycast(ped, list);
|
||||
|
||||
if (list.Count > 0)
|
||||
{
|
||||
@ -290,8 +288,6 @@ namespace UnityExplorer.UI.Main.Home
|
||||
_wasDisabledGraphics.Clear();
|
||||
}
|
||||
|
||||
#region UI
|
||||
|
||||
internal static Text s_objNameLabel;
|
||||
internal static Text s_objPathLabel;
|
||||
internal static Text s_mousePosLabel;
|
||||
@ -328,7 +324,5 @@ namespace UnityExplorer.UI.Main.Home
|
||||
|
||||
s_UIContent.SetActive(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -54,21 +54,11 @@ namespace UnityExplorer.UI.Inspectors
|
||||
// check if currently inspecting this object
|
||||
foreach (InspectorBase tab in m_currentInspectors)
|
||||
{
|
||||
if (ReferenceEquals(obj, tab.Target))
|
||||
if (RuntimeProvider.Instance.IsReferenceEqual(obj, tab.Target))
|
||||
{
|
||||
SetInspectorTab(tab);
|
||||
return;
|
||||
}
|
||||
#if CPP
|
||||
else if (unityObj && tab.Target is UnityEngine.Object uTabObj)
|
||||
{
|
||||
if (unityObj.m_CachedPtr == uTabObj.m_CachedPtr)
|
||||
{
|
||||
SetInspectorTab(tab);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
InspectorBase inspector;
|
||||
|
Reference in New Issue
Block a user