기술 자료

Unity Engine

Unity Engine

GetPosition()

Gets the position of the window relative to the top-left corner of the screen.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public Vector2Int GetPosition()

Returns

Type

Description

Vector2IntA Vector2Int that represents the position of the window.

Examples

using UnityEngine;using UnityEngine.Windowing;public class WindowPositionExample : MonoBehaviour{ void Start() { var window = GameWindow.Main; Vector2Int pos = window.GetPosition(); Debug.Log($"Window position: {pos.x}, {pos.y}"); }}