Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.0.0-preview.9
Issue ID
1282125
Regression
No
UI Toolkit uses display DPI instead of Device Simulator DPI in events
How to reproduce:
1. Open attached project ("BugReportProject.7z")
2. Open Game view in the Simulator mode
3. Play
4. Click on different points on the simulated device
5. Observe Console output
6. Compare "event position" with "corrected position"
Expected result: "event position" is the same as "corrected position"
Actual result: "event position" is calculated with wrong DPI (real display DPI)
Reproducible with: 1.0.0-preview.7, 1.0.0-preview.8, 1.0.0-preview.9 (2020.1.8f1, 2020.2.0b2)
Couldn't reproduce with: 2019.4.12f1 as UI Toolkit is not available, 2020.2.0b3 and newer as UI Toolkit should be used with 2020.2.0b2 and earlier
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
- Editor Perforce login fails when Perforce shows a license expiry warning
- Assertion failed error in HDRP builds when enabling STP via script
- FBX Resamples Curves incorrectly when importing FBX files
- ProBuilder GameObject Faces disappear when increasing the Sides Count value
- FileUtil.CopyFileOrDirectory throws IOException when destination parent folder does not exist
Resolution Note:
This behaviour is expected with regards to the PanelSettings asset used by the UI Document in this project.
The relation between UI space units and actual physical pixels is controlled by the the Scale Mode of the Panel Settings.
The values used throughout the UI Toolkit API for screen position are expressed in UI "space", a sort of virtual pixel unit if you will.
When using "Constant physical size" as it is the case in this scene, UI space units will be kept independent of the screen DPI, effectively allowing UI objects to look the same on all screens regardless of the surface DPI.
To obtain a 1 to 1 ratio between UI space units and actual physical pixels, switch the Scale Mode to "Constant Pixel Size" and set the "Scale" value to 1.
More information can be found in this document: https://docs.google.com/document/d/1C_c5hrqOrkgYjmD3s04vcKfk-aQ8n007Ti7vUR51SeQ
Which will become the user manual at release time.