Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit c2d9b9b

Browse files
committed
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.
1 parent c748be7 commit c2d9b9b

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

src/Core/Input/CursorUnlocker.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static void UpdateCursorControl()
8989

9090
public static void SetEventSystem()
9191
{
92-
// temp disabled for new InputSystem
92+
// not overriding EventSystem for new InputSystem, dont seem to need to.
9393
if (InputManager.CurrentType == InputType.InputSystem)
9494
return;
9595

@@ -112,6 +112,7 @@ public static void SetEventSystem()
112112

113113
public static void ReleaseEventSystem()
114114
{
115+
// not overriding EventSystem for new InputSystem, dont seem to need to.
115116
if (InputManager.CurrentType == InputType.InputSystem)
116117
return;
117118

src/Core/TestClass.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ namespace UnityExplorer
77
{
88
public static class TestClass
99
{
10+
public static UI.Main.PanelDragger.ResizeTypes flags = UI.Main.PanelDragger.ResizeTypes.NONE;
11+
1012
#if CPP
1113
public static string testStringOne = "Test";
1214
public static Il2CppSystem.Object testStringTwo = "string boxed as cpp object";

src/ExplorerCore.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace UnityExplorer
1313
public class ExplorerCore
1414
{
1515
public const string NAME = "UnityExplorer";
16-
public const string VERSION = "3.3.7";
16+
public const string VERSION = "3.3.8";
1717
public const string AUTHOR = "Sinai";
1818
public const string GUID = "com.sinai.unityexplorer";
1919

@@ -48,7 +48,7 @@ public static void Init(IExplorerLoader loader)
4848

4949
Log($"{NAME} {VERSION} initialized.");
5050

51-
// InspectorManager.Instance.Inspect(typeof(TestClass));
51+
//InspectorManager.Instance.Inspect(typeof(TestClass));
5252
}
5353

5454
public static void Update()

src/UI/InteractiveValues/InteractiveEnum.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public override void RefreshUIForValue()
9494
{
9595
base.RefreshUIForValue();
9696

97-
if (m_subContentConstructed)
97+
if (m_subContentConstructed && !(this is InteractiveFlags))
9898
{
9999
m_dropdownText.text = Value?.ToString() ?? "<no value set>";
100100
}

src/UI/InteractiveValues/InteractiveFlags.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ public InteractiveFlags(object value, Type valueType) : base(value, valueType)
2626

2727
public override void OnValueUpdated()
2828
{
29-
base.OnValueUpdated();
30-
3129
if (Owner.CanWrite)
3230
{
3331
var enabledNames = new List<string>();
@@ -37,10 +35,10 @@ public override void OnValueUpdated()
3735
enabledNames.AddRange(enabled);
3836

3937
for (int i = 0; i < m_values.Length; i++)
40-
{
4138
m_enabledFlags[i] = enabledNames.Contains(m_values[i].Value);
42-
}
4339
}
40+
41+
base.OnValueUpdated();
4442
}
4543

4644
public override void RefreshUIForValue()

src/UI/Main/CSConsole/CSharpConsole.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public override bool Init()
5959

6060
ResetConsole(false);
6161
// Make sure compiler is supported on this platform
62-
Evaluator.Compile("");
62+
Evaluator.Compile("new object();");
6363

6464
return true;
6565
}
@@ -73,6 +73,8 @@ public override bool Init()
7373

7474
ExplorerCore.LogWarning(info);
7575

76+
this.RefNavbarButton.GetComponentInChildren<Text>().text += " (disabled)";
77+
7678
return false;
7779
}
7880
}

0 commit comments

Comments
 (0)