Skip to content

Commit

Permalink
Check for Linux player in DisplayManager
Browse files Browse the repository at this point in the history
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: sinai-dev#167
  • Loading branch information
Qkrisi committed Aug 28, 2022
1 parent 1e1fb0e commit 819604c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UI/DisplayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class DisplayManager
public static int Width => ActiveDisplay.renderingWidth;
public static int Height => ActiveDisplay.renderingHeight;

public static Vector3 MousePosition => Application.isEditor
public static Vector3 MousePosition => Application.isEditor || Application.platform == RuntimePlatform.LinuxPlayer
? InputManager.MousePosition
: Display.RelativeMouseAt(InputManager.MousePosition);

Expand Down

0 comments on commit 819604c

Please sign in to comment.