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
- Extended component titles exceed the window's display boundaries
- Light is not applied properly to Terrain Details when using Light Layers
- Opening reference for XR component redirects to a missing page
- [Android]Crash on PersistentManager::GlobalToLocalSerializedFileIndex(SerializedObjectIdentifier const&) when building the Android Player
- [Android] The Video Player stops playing at different points when Skip On Drop is enabled
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."