UnityExplorer icon indicating copy to clipboard operation
UnityExplorer copied to clipboard

[Bug]: Can't move or resize panels on Linux

Open Qkrisi opened this issue 2 years ago • 1 comments

Are you on the latest version of UnityExplorer?

  • [X] Yes, I'm on the latest version of UnityExplorer.

Which release are you using?

Standalone Mono

Which game did this occur on?

Keep Talking and Nobody Explodes (Unity 2017.4.22f1, .NET Framework 3.5)

Describe the issue.

After I call UnityExplorer.ExplorerStandalone.CreateInstance();, the UI panels of Unity Explorer open, and work like they should, except I can't move nor resize them making the mod very clunky to use. This only happens on Linux (tested on Debian 11), on Windows (10) it works properly. The game uses the legacy input system across every platform and runs natively on Linux. I tried setting Disable_EventSystem_Override to True (as per Common issues and solutions), but that didn't solve the issue.

Relevant log output

There's nothing relevant in the Unity log nor the log of the library (Standalone), but here's the latter one anyway (to verify versions and such):

UnityExplorer 4.9.0 initializing...
[UniverseLib] UniverseLib 1.5.1 initializing...
[UniverseLib] Finished UniverseLib initial setup.
[UniverseLib] Initialized Legacy Input support
[UniverseLib] Loaded modern bundle for Unity 2017.4.22f1
[UniverseLib] UniverseLib 1.5.1 initialized.
Creating UI...

UnityExplorer 4.9.0 (Mono) initialized.

Qkrisi avatar Aug 23 '22 12:08 Qkrisi

Found the issue. DisplayManager uses Display.RelativeMouseAt, which as the Unity documentation states, isn't implemented for Linux, so it always returns Vector3.zero.

I think it should just use the mouse position without RelativeMouseAt on Linux players until there's a better solution. It'll have problems for people who run the game on a secondary screen, but it's a fine temporary solution.

Qkrisi avatar Aug 28 '22 13:08 Qkrisi