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
- Shader warning in 'Hidden/Core/DebugOccluder' thrown after building High Definition 3D Sample Template
- Audio Mixer “+” buttons overlap with UI when the Audio Mixer window layout is set to Horizontal
- "Clear" button in the "Set project display name" closes all the pop-up instead of clearing just a name from the field
- Video Player renders no video on specific devices when using Vulkan
- The Editor slows itself down by showing tons of warnings when the majority of TransformAccessArrays content are NullRefs
Resolution Note:
Fixed in Unity 2020.2.0b14 and 2021.1.0a7