Represents a native OS window managed by Unity's windowing system. This API is currently available only in EmbeddedLinux and QNX platforms.
The GameWindow class provides APIs to query and control window properties such as title, size, position, display, and fullscreen mode. It also supports asynchronous operations for moving, resizing, and destroying windows.
| Property | Description |
|---|---|
| Main | Gets the main window of the application. |
| Method | Description |
|---|---|
| DisposeAsync | Asynchronously disposes of the window and releases its resources. |
| FocusedThisFrame | Checks if the window gained input focus during the current frame. |
| GetDisplayInfo | Gets the display information of the display that holds the window. |
| GetFullScreenMode | Gets the full-screen mode of the window. |
| GetHashCode | Returns the hash code for this window. |
| GetHeight | Gets the height of the window. |
| GetLogicalDpi | Gets the logical DPI of the window. |
| GetPosition | Gets the position of the window relative to the top-left corner of the screen. |
| GetResolution | Gets the resolution of the window. |
| GetTitle | Gets the title of the window. |
| GetWidth | Gets the width of the window. |
| HiddenThisFrame | Checks if the window was hidden during the current frame. |
| IsFocused | Checks if the window has input focus. |
| IsMain | Returns true if this window is the main application window. |
| IsResizable | Checks if the window can be resized manually. |
| IsValid | Returns true if this window is valid and not destroyed. |
| IsVisible | Checks if the window is visible. |
| MoveTo | Moves the window to a new position on its current display asynchronously. |
| PositionChangedThisFrame | Checks if the window's position changed during the current frame. |
| RegisterDestructionCallback | Registers a callback that is invoked when the window is destroyed. |
| RegisterFocusChangedCallback | Registers a callback that is invoked when the window gains or loses input focus. |
| RegisterPositionChangedCallback | Registers a callback that is invoked when the window's position changes. |
| RegisterResolutionChangedCallback | Registers a callback that is invoked when the window's resolution changes. |
| RegisterVisibilityChangedCallback | Registers a callback that is invoked when the window is shown or hidden. |
| ResolutionChangedThisFrame | Checks if the window's resolution changed during the current frame. |
| SetFullScreenMode | Sets the full-screen mode of the window. |
| SetIsResizable | Sets whether the window can be resized manually. |
| SetIsVisible | Sets whether the window is visible. |
| SetResolution | Sets the resolution of the window. |
| SetTitle | Sets the title of the window. |
| ShownThisFrame | Checks if the window was shown during the current frame. |
| UnfocusedThisFrame | Checks if the window lost input focus during the current frame. |
| UnregisterDestructionCallback | Unregisters a callback so it is no longer invoked when the window is destroyed. |
| UnregisterFocusChangedCallback | Unregisters a callback so it is no longer invoked when the window's focus changes. |
| UnregisterPositionChangedCallback | Unregisters a callback so it is no longer invoked when the window's position changes. |
| UnregisterResolutionChangedCallback | Unregisters a callback so it is no longer invoked when the window's resolution changes. |
| UnregisterVisibilityChangedCallback | Unregisters a callback so it is no longer invoked when the window's visibility changes. |