Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.0.0-preview.4
Issue ID
1234377
Regression
No
Mouse position is not in correct coordinate space when accessed from EditorWindow.OnGUI
Tested on macOS using `"com.unity.inputsystem":"1.0.0-preview.4"`. Using 2 external monitors with the Macbook lid closed.
When reading the mouse position, x values are starting at the far right of the window and decreasing to negative width on the far left, and y is starting at what seems to be the top of the status bar and going up. The docs say that input should be mapped to EditorWindow coordinates, but that doesn’t seem to be the case.
Tested with the following script:
[CODE]
using System;
using UnityEditor;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputTesting : EditorWindow
{
[MenuItem("Window/Debug SceneView Input")]
static void Init()
{
GetWindow<InputTesting>();
}
void OnEnable()
{
SceneView.duringSceneGui += OnSceneView;
}
void OnDisable()
{
SceneView.duringSceneGui -= OnSceneView;
}
void OnSceneView(SceneView view)
{
var mouse = $"{Mouse.current.position.x.ReadValue()}, {Mouse.current.position.y.ReadValue()}";
Handles.BeginGUI();
GUILayout.Label(mouse);
Handles.EndGUI();
if (Event.current.type == EventType.MouseMove)
SceneView.RepaintAll();
}
}
[/CODE]
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Constant console errors when using Min/Max Slider in PlayMode
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- [Linux] AutoLocale log is logged when opening a project
- Global Scenes are not included in the Build when building multiple Build Profiles at the same time
- [iOS] WebCamDevice.availableResolutions returns a single resolution with width and height both 0 on some iOS devices
Resolution Note:
"For context, we're going to nuke edit mode support in the input system. Pen support with pressure and tilt is coming to IMGUI and UI Elements and will solve the problem here much better than the input system can."