기술 자료

Unity Engine

Unity Engine

GetLogicalDpi()

Gets the logical DPI of the window.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public float GetLogicalDpi()

Returns

Type

Description

floatThe 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}"); }}