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
- Crash on "0x00007FF9D3B9EE3F (nvwgf2umx) OpenAdapter10" when entering Edit Mode of ShaderGraph asset
- Cubemap.CreateExternalTexture() assumes to use the project's color space when native texture pointer is set to sRGB
- Serialization layout error occurs when loading and unloading AssetBundles in a specific sequence
- Surface Shader lighting displayed incorrectly when Point Light is intersecting a Particle System inside Camera Frustum
- Private method is still visible in the Inspector Window's button onClick events when setting it from public to private
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."