referenceDpi
The DPI that the UI is designed for.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Property
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public float referenceDpi { get; set; }
Remarks
When PanelSettings.scaleMode is set to , Unity compares this value to the actual screen DPI, and scales the UI accordingly in the Game view.
ConstantPhysicalSizeIf Unity cannot determine the screen DPI, it uses the PanelSettings.fallbackDpi instead.
In the editor, UI Builder and the Inspector use their own window scaling (IMGUI / editor pixels-per-point); they are not the same context as play mode IGameViewRenderInfo DPI used for Game view overlay panels.