Search Issue Tracker
Fixed
Votes
0
Found in
2020.2.0a12
2020.2.0b10
2021.1
Issue ID
1298496
Regression
Yes
Input.MousePosition returns Editor's x coordinate instead of Game view's when the script was instantiated during the Play Mode
How to reproduce:
1. Open the "1298496_Repro" project
2. Open the Scene "SampleScene"
3. Enter the Play Mode
4. Drag the "GameObject" Asset from the Project window to the Hierarchy
5. Left-click and release mouse button on the Game view
6. Left-click hold and drag the mouse in the Game view's screen bottom left corner
Expected results: The Console prints out (0,0,0) coordinates
Actual results: The Console prints x value relative to the Editor instead of the Game view's screen
Reproducible with: 2020.2.0a12, 2020.2.0b13, 2021.1.0a1, 2021.1.0a6
Not reproducible with: 2018.4.30f1, 2019.4.16f1, 2020.1.17f1, 2020.2.0a11, 2020.2.0b14, 2020.2.0f1, 2021.1.0a7, 2021.1.0a10
Note:
- The first left-click and hold will only print value once, only after releasing and pressing left-click again the values will be printed every frame
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
Fixed in Unity 2020.2.0b14 and 2021.1.0a7