Hello, how can I change the resolution in a script?
I didn’t find anything in the documentation…or I just searched wrong.
like in Unity:
// Switch to 640 x 480 full screen
Screen.SetResolution(640, 480, true);
Thanks
Hello, how can I change the resolution in a script?
I didn’t find anything in the documentation…or I just searched wrong.
like in Unity:
// Switch to 640 x 480 full screen
Screen.SetResolution(640, 480, true);
Thanks
You can change the screen size via Screen.Size
, for full screen you can do ‘Screen.IsFullscreen’ or in 1.7 there is a way to set the GameWindowMode
via the Screen
class as well.
Thank you,
Screen.Size = new Vector2(1600, 900);
Screen.GameWindowMode = GameWindowMode.Fullscreen;
that makes it work
In same context, it is possible to check that resolution is supported?
Yes, you can query resolution@refresh rate list from the class.
I found it.
For fullscreen mode you can use: GPUDevice.Instance.VideoOutputModes(since in theory you can set resolution higher then desktop size).
Also you can use Platform.DesktopSize to get main monitor size.