mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-23 01:59:40 +08:00
Check for Linux player in DisplayManager
This PR adds a Linux check for the mouse position property so people can use Unity Explorer on Linux at least on the primary monitor until a better solution is found. Issue describing the bug: https://github.com/sinai-dev/UnityExplorer/issues/167
This commit is contained in:
parent
1e1fb0e27b
commit
819604ce8d
@ -12,7 +12,7 @@ namespace UnityExplorer.UI
|
|||||||
public static int Width => ActiveDisplay.renderingWidth;
|
public static int Width => ActiveDisplay.renderingWidth;
|
||||||
public static int Height => ActiveDisplay.renderingHeight;
|
public static int Height => ActiveDisplay.renderingHeight;
|
||||||
|
|
||||||
public static Vector3 MousePosition => Application.isEditor
|
public static Vector3 MousePosition => Application.isEditor || Application.platform == RuntimePlatform.LinuxPlayer
|
||||||
? InputManager.MousePosition
|
? InputManager.MousePosition
|
||||||
: Display.RelativeMouseAt(InputManager.MousePosition);
|
: Display.RelativeMouseAt(InputManager.MousePosition);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user