yukieiji / UnityExplorer

An in-game UI for exploring, debugging and modifying IL2CPP and Mono Unity games.
GNU General Public License v3.0
197 stars 14 forks source link

[Bug]: Can't interact with the mods menu panels in Firewatch #11

Open originalnicodr opened 6 months ago

originalnicodr commented 6 months ago

Are you on the latest version of UnityExplorer?

Which release are you using?

BepInEx 5.X Mono

Which game did this occur on?

Firewatch

Describe the issue.

It seems that we cannot interact with the mod's menu on Firewatch. We can however drag the panels around, but clicking on any of their contents (e.g. buttons) does nothing. Unfortunately, the log doesn't seem to have anything relevant regarding this (included the BepInEx log with more info just in case).

I have tried fixing this myself but couldn't pinpoint where the problem lies. Let me know if I can do anything to help you with this!

As a side note, I found the same problem with the game InnerSpace, so I believe it's not a one-game kinda thing. Will put its log below as well.

Relevant log output

Firewatch:

[Message:   BepInEx] BepInEx 5.4.22.0 - firewatch (3/9/2024 1:39:52 PM)
[Info   :   BepInEx] Running under Unity v2017.4.40.7214086
[Info   :   BepInEx] CLR runtime version: 2.0.50727.1433
[Info   :   BepInEx] Supports SRE: True
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.22.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Warning:  HarmonyX] AccessTools.Property: Could not find property for type UnityEngine.Application and name isBatchMode
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 1 plugin to load
[Info   :   BepInEx] Loading [UnityExplorer 4.11.2]
[Message:UnityExplorer] UnityExplorer 4.11.2 initializing...
[Message:UnityExplorer] [UniverseLib] UniverseLib 1.5.6 initializing...
[Message:UnityExplorer] [UniverseLib] Finished UniverseLib initial setup.
[Warning:  HarmonyX] AccessTools.Method: Could not find method for type UnityEngine.Canvas and name get_renderingDisplaySize and parameters 
[Message:   BepInEx] Chainloader startup complete
[Message:UnityExplorer] [UniverseLib] Initialized Legacy Input support
[Message:UnityExplorer] [UniverseLib] Loaded modern bundle for Unity 2017.4.40f1
[Message:UnityExplorer] [UniverseLib] UniverseLib 1.5.6 initialized.
[Message:UnityExplorer] Creating UI...
[Message:UnityExplorer] UnityExplorer 4.11.2 (Mono) initialized.

InnerSpace:

[Message:   BepInEx] BepInEx 5.4.22.0 - InnerSpaceSub (10/14/2021 1:06:26 AM)
[Info   :   BepInEx] Running under Unity v5.6.3.16509117
[Info   :   BepInEx] CLR runtime version: 2.0.50727.1433
[Info   :   BepInEx] Supports SRE: True
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.22.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Warning:  HarmonyX] AccessTools.Property: Could not find property for type UnityEngine.Application and name isBatchMode
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 1 plugin to load
[Info   :   BepInEx] Loading [UnityExplorer 4.11.2]
[Message:UnityExplorer] UnityExplorer 4.11.2 initializing...
[Message:UnityExplorer] [UniverseLib] UniverseLib 1.5.6 initializing...
[Message:UnityExplorer] [UniverseLib] Finished UniverseLib initial setup.
[Warning:  HarmonyX] AccessTools.Method: Could not find method for type UnityEngine.Canvas and name get_renderingDisplaySize and parameters 
[Message:   BepInEx] Chainloader startup complete
[Info   :   Console] Rewired: Searching for compatible XInput library...
[Info   :   Console] Rewired: Found Xinput1_4.dll.
[Message:UnityExplorer] [UniverseLib] Initialized Legacy Input support
[Message:UnityExplorer] [UniverseLib] Loaded legacy.5.6 bundle for Unity 5.6.3p4
[Message:UnityExplorer] [UniverseLib] UniverseLib 1.5.6 initialized.
[Message:UnityExplorer] Creating UI...
[Message:UnityExplorer] UnityExplorer 4.11.2 (Mono) initialized.
yukieiji commented 6 months ago

Does the same issues in v4.11.1? In v4.11.2 I have implemented some safeguards around the panel to prevent null reference errors, and it's possible that the fixes are causing this.

originalnicodr commented 6 months ago

Tested with v.4.11.1 and it had the same problem.

I also tested with sinai-dev's last version of their Unity Explorer (4.9.0) and it has the same problem, so doesn't seem to be something you introduced in your fork.

yukieiji commented 5 months ago

Is it possible to increase the version of BepInEx? If possible, will it still not work?

originalnicodr commented 5 months ago

Tried installing BepInEx 6 on Firewatch but it didn't work. I believe BepInEx 6 Mono support has not really been tested as they have focused on supporting IL2CPP for the moment.

Having said that, I did test with MelonLoader since v0.5 also supports Mono games and had the exact same problem, so yeah doesn't seem to be a mod-loader issue.

yukieiji commented 5 months ago

Hmmm....if it doesn't work even after upgrading the Mono version, then it's not a problem occurring with BepInEx and UE. Then the only thing these two games have in common is that Legacy Input is enabled?

originalnicodr commented 5 months ago

Then the only thing these two games have in common is that Legacy Input is enabled?

I doubt that is the culprit since I have tested the Unity Explorer with a ton of games these last few days, and most of them are using the Legacy Input system.

Will see if I can keep researching on my own and maybe try to fix it. Will let you know if I find anything.

yukieiji commented 5 months ago

I've had similar bugs reported and I'd like to ask you to check one of them.

Are these games Graphic.defaultGraphicMaterial.shader other than UI/Default shader?

originalnicodr commented 5 months ago

After writing this I tried Disable EventSystem override = true on both games. Firewatch allowed me to click the Unity Explorer menu on the games menu, although not inside a loaded game, so I managed to inspect the graphics objects on the startup screen and found this, not sure if it's what you were referring to:

iZwiQdTVvX

I tried to also turn on the Disable EventSystem override constant on InnerSpace , but it didn't work, so I couldn't check this there.

Does that answer your question? Is there anything else I can do to help you out?

yukieiji commented 5 months ago

If you changed EventSystem and it now works, then it is possible that EventSystem was changed in-game after UE was launched. I might try adjusting the keyboard shortcut or something to force resetting EventSystem.