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:
Sinai 2021-04-06 01:01:46 +10:00
parent c748be7bcc
commit c2d9b9b59e
6 changed files with 12 additions and 9 deletions

View File

@ -89,7 +89,7 @@ namespace UnityExplorer.Core.Input
public static void SetEventSystem() public static void SetEventSystem()
{ {
// temp disabled for new InputSystem // not overriding EventSystem for new InputSystem, dont seem to need to.
if (InputManager.CurrentType == InputType.InputSystem) if (InputManager.CurrentType == InputType.InputSystem)
return; return;
@ -112,6 +112,7 @@ namespace UnityExplorer.Core.Input
public static void ReleaseEventSystem() public static void ReleaseEventSystem()
{ {
// not overriding EventSystem for new InputSystem, dont seem to need to.
if (InputManager.CurrentType == InputType.InputSystem) if (InputManager.CurrentType == InputType.InputSystem)
return; return;

View File

@ -7,6 +7,8 @@ namespace UnityExplorer
{ {
public static class TestClass public static class TestClass
{ {
public static UI.Main.PanelDragger.ResizeTypes flags = UI.Main.PanelDragger.ResizeTypes.NONE;
#if CPP #if CPP
public static string testStringOne = "Test"; public static string testStringOne = "Test";
public static Il2CppSystem.Object testStringTwo = "string boxed as cpp object"; public static Il2CppSystem.Object testStringTwo = "string boxed as cpp object";

View File

@ -13,7 +13,7 @@ namespace UnityExplorer
public class ExplorerCore public class ExplorerCore
{ {
public const string NAME = "UnityExplorer"; public const string NAME = "UnityExplorer";
public const string VERSION = "3.3.7"; public const string VERSION = "3.3.8";
public const string AUTHOR = "Sinai"; public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.unityexplorer"; public const string GUID = "com.sinai.unityexplorer";
@ -48,7 +48,7 @@ namespace UnityExplorer
Log($"{NAME} {VERSION} initialized."); Log($"{NAME} {VERSION} initialized.");
// InspectorManager.Instance.Inspect(typeof(TestClass)); //InspectorManager.Instance.Inspect(typeof(TestClass));
} }
public static void Update() public static void Update()

View File

@ -94,7 +94,7 @@ namespace UnityExplorer.UI.InteractiveValues
{ {
base.RefreshUIForValue(); base.RefreshUIForValue();
if (m_subContentConstructed) if (m_subContentConstructed && !(this is InteractiveFlags))
{ {
m_dropdownText.text = Value?.ToString() ?? "<no value set>"; m_dropdownText.text = Value?.ToString() ?? "<no value set>";
} }

View File

@ -26,8 +26,6 @@ namespace UnityExplorer.UI.InteractiveValues
public override void OnValueUpdated() public override void OnValueUpdated()
{ {
base.OnValueUpdated();
if (Owner.CanWrite) if (Owner.CanWrite)
{ {
var enabledNames = new List<string>(); var enabledNames = new List<string>();
@ -37,10 +35,10 @@ namespace UnityExplorer.UI.InteractiveValues
enabledNames.AddRange(enabled); enabledNames.AddRange(enabled);
for (int i = 0; i < m_values.Length; i++) for (int i = 0; i < m_values.Length; i++)
{
m_enabledFlags[i] = enabledNames.Contains(m_values[i].Value); m_enabledFlags[i] = enabledNames.Contains(m_values[i].Value);
}
} }
base.OnValueUpdated();
} }
public override void RefreshUIForValue() public override void RefreshUIForValue()

View File

@ -59,7 +59,7 @@ namespace UnityExplorer.UI.Main.CSConsole
ResetConsole(false); ResetConsole(false);
// Make sure compiler is supported on this platform // Make sure compiler is supported on this platform
Evaluator.Compile(""); Evaluator.Compile("new object();");
return true; return true;
} }
@ -73,6 +73,8 @@ namespace UnityExplorer.UI.Main.CSConsole
ExplorerCore.LogWarning(info); ExplorerCore.LogWarning(info);
this.RefNavbarButton.GetComponentInChildren<Text>().text += " (disabled)";
return false; return false;
} }
} }