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
- Crash on mecanim::SetValueWeight when switching the AnimationMixerPlayable connection with Animator's UpdateMode set to "Animate Physics"
- The "StringComparer.InvariantCultureIgnoreCase.GetHashCode()" returns different Hash Codes for the same word with the only difference being case sensitivity in WebGL
- 2D Light Textures show the lights of any 'blend style' index higher than theirs (if present) when they aren't visible by the Camera using Render Graph
- [SpeedTree] Wireframe mode not rendering correctly ST assets
- Light2D affecting only the Default Sorting Layer will also affect any Custom Lit Sprite not on that Layer when using Render Graph
Resolution Note:
Fixed in Unity 2020.2.0b14 and 2021.1.0a7