기술 자료

Unity Engine

Unity Engine

GetDisplayInfo()

Gets the display information of the display that holds the window.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public DisplayInfo GetDisplayInfo()

Returns

Type

Description

DisplayInfoA DisplayInfo object with the display details.

Examples

using UnityEngine;using UnityEngine.Windowing;public class DisplayInfoExample : MonoBehaviour{ void Start() { var window = GameWindow.Main; DisplayInfo info = window.GetDisplayInfo(); Debug.Log($"Display: {info.name}, Resolution: {info.width}x{info.height}"); }}