mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-09-20 21:46:02 +08:00
a few small fixes
* Fix InteractiveFlags toggles not being properly updated * Fix cases where games that don't have Reflection.Emit would still have the C# Console available. Also added a "(disabled)" message to the tab button.
This commit is contained in:
@ -94,7 +94,7 @@ namespace UnityExplorer.UI.InteractiveValues
|
||||
{
|
||||
base.RefreshUIForValue();
|
||||
|
||||
if (m_subContentConstructed)
|
||||
if (m_subContentConstructed && !(this is InteractiveFlags))
|
||||
{
|
||||
m_dropdownText.text = Value?.ToString() ?? "<no value set>";
|
||||
}
|
||||
|
@ -26,8 +26,6 @@ namespace UnityExplorer.UI.InteractiveValues
|
||||
|
||||
public override void OnValueUpdated()
|
||||
{
|
||||
base.OnValueUpdated();
|
||||
|
||||
if (Owner.CanWrite)
|
||||
{
|
||||
var enabledNames = new List<string>();
|
||||
@ -37,10 +35,10 @@ namespace UnityExplorer.UI.InteractiveValues
|
||||
enabledNames.AddRange(enabled);
|
||||
|
||||
for (int i = 0; i < m_values.Length; i++)
|
||||
{
|
||||
m_enabledFlags[i] = enabledNames.Contains(m_values[i].Value);
|
||||
}
|
||||
}
|
||||
|
||||
base.OnValueUpdated();
|
||||
}
|
||||
|
||||
public override void RefreshUIForValue()
|
||||
|
@ -59,7 +59,7 @@ namespace UnityExplorer.UI.Main.CSConsole
|
||||
|
||||
ResetConsole(false);
|
||||
// Make sure compiler is supported on this platform
|
||||
Evaluator.Compile("");
|
||||
Evaluator.Compile("new object();");
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -73,6 +73,8 @@ namespace UnityExplorer.UI.Main.CSConsole
|
||||
|
||||
ExplorerCore.LogWarning(info);
|
||||
|
||||
this.RefNavbarButton.GetComponentInChildren<Text>().text += " (disabled)";
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user