09-07-2021
17:22
will change the window width to 1366 pixels and the window height to 720 pixels
You can add f at the end of the command to force a fullscreen mode:
r.SetRes 1366x720f
Usefull if you have a widget that allows user to change your game resolution
If you need to change the resolution multiple times during your game, changing the user settings is the way to go. You can just grab them, update the window resolution then apply the settings.