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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
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.