GetLogicalDpi()
Gets the logical DPI of the window.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Windowing
- Assembly: UnityEngine.WindowingModule
public float GetLogicalDpi()
Returns
Type | Description |
|---|---|
| float | The logical DPI as a float. |
Remarks
Note that the logical DPI defaults to 0 if it's not supported by the platform.
Examples
using UnityEngine;using UnityEngine.Windowing;public class LogicalDpiExample : MonoBehaviour{ void Start() { var window = GameWindow.Main; float dpi = window.GetLogicalDpi(); Debug.Log($"Logical DPI: {dpi}"); }}