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
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
- [RenderingDebugger][InputSystemPackage] Ctrl+Backspace shortcut doesn't work to open the Rendering Debugger when New Input System is in use
Resolution Note:
Fixed in Unity 2020.2.0b14 and 2021.1.0a7