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
- [APV] Impossible to switch between multiple Baking Set when multiple scenes are loaded additively
- [Linux] Low project loading speed when using Ubuntu 24.10
- [VFX Graph] URP ShaderGraph integration issue with VFX and Fog.
- The Editor is slowed down when a Volume Profile with many Overrides is open in the Inspector window
- Lightmap "View" button is not symmetric and has an empty space
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."