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
- Erratic Mesh panning behavior in Inspector Mesh Preview when panning fully zoomed out
- Error "Light baking failed with error code 5 (Convergence data not available while rendering lightmaps)" thrown in Console when generating lighting for specific GameObjects
- Copy and Paste options for an Animation Property value are disabled in the Right click contextual menu
- Asset is not found when searching the Label "NewLabel" in Search Window
- "Compute dispatch: missing texture ID..." and "Compute dispatch: missing UAV ID..." warnings are thrown after changing the platform in High Definition 3D template
Resolution Note:
Fixed in Unity 2020.2.0b14 and 2021.1.0a7