float The logical DPI as a float.
Gets the logical DPI of the window.
Note that the logical DPI defaults to 0 if it's not supported by the platform.
using UnityEngine; using UnityEngine.Windowing;
public class LogicalDpiExample : MonoBehaviour { void Start() { var window = GameWindow.Main; float dpi = window.GetLogicalDpi(); Debug.Log($"Logical DPI: {dpi}"); } }