Set standalone player window resolution, position and style. More...
Inherits MonoBehaviour.
Public Member Functions | |
void | Apply () |
Apply window resolution. More... | |
Static Public Member Functions | |
static Resolution | GetResolution () |
Get the primary monitor resolution. More... | |
static void | SetFullscreen () |
Set window fullscreen with primary monitor resolution. More... | |
static void | SetFullscreen (int width, int height) |
Set window fullscreen with specified size. More... | |
static void | SetWindowed (int width, int height) |
Set normal window with specified size. More... | |
static void | SetBorderless (int x, int y, int width, int height) |
Set borderless window with specified position. More... | |
static void | SetPopup (int width, int height) |
Set popup window with specified size centered on primary monitor. More... | |
Public Attributes | |
bool | applyOnAwake |
Flag if to apply resolution when Awake() . More... | |
WindowStyle | style = WindowStyle.Fullscreen |
The window style, borderless for Windows only. More... | |
Rect | rect = new Rect(0f, 0f, 1920f, 1080f) |
The window position rect. More... | |
Set standalone player window resolution, position and style.
|
static |
Get the primary monitor resolution.
|
static |
Set window fullscreen with primary monitor resolution.
Standalone player only. This may take a few frames to process.
|
static |
Set window fullscreen with specified size.
Standalone player only. This may take a few frames to process.
width | Screen width. |
height | Screen height. |
|
static |
Set normal window with specified size.
Standalone player only. The result resolution isn't guaranteed if the assigned out of range. This may take a few frames to process.
width | Window width. |
height | Window height. |
|
static |
Set borderless window with specified position.
Windows standalone only. This may take a few frames to process.
x | The x offset from primary monitor. |
y | The y offset from primary monitor. |
width | Window width. |
height | Window height. |
|
static |
Set popup window with specified size centered on primary monitor.
Windows standalone only. This may take a few frames to process.
width | Window width. |
height | Window height. |
void Apply | ( | ) |
Apply window resolution.
Only works on standalone player, and the borderless style is for Windows only.
bool applyOnAwake |
Flag if to apply resolution when Awake()
.
WindowStyle style = WindowStyle.Fullscreen |
The window style, borderless for Windows only.
Rect rect = new Rect(0f, 0f, 1920f, 1080f) |
The window position rect.
The size's used besides fullscreen, the position's only used by borderless style.