DisplayInfo
Represents a connected display.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Struct
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
- Implements: IEquatable<DisplayInfo>
public struct DisplayInfo : IEquatable<DisplayInfo>
Fields
Value | Description |
|---|---|
| height | The display height in pixels. |
| name | Human-friendly display name. |
| physicalDpi | The current pixel density of the display measured in dots-per-inch (DPI). |
| refreshRate | The current refresh rate of the display. |
| width | The display width in pixels. |
| workArea | Specifies the work area rectangle of the display relative to the top left corner. For example, it excludes the area covered by the macOS Dock or the Windows Taskbar. |
Properties
Property | Description |
|---|---|
| resolutions | Returns all full-screen resolutions supported on the display (Read Only). |
Static Methods
Method | Description |
|---|---|
| GetLayout | Retrieves information about the connected displays and populates a list with properties such as display name, resolution, refresh rate, and other relevant attributes. |
| RegisterLayoutChangedCallback | Registers a callback that Unity invokes when the display layout changes, for example when a display is connected or disconnected. |
| UnregisterLayoutChangedCallback | Removes a callback that was registered with DisplayInfo.RegisterLayoutChangedCallback. |