Topic was automatically imported from the old Question2Answer platform.
Asked By
exuin
Okay, so you know how in project settings you have display → window → size? I want to change that value and have it affect the game during runtime. The docs say that I can’t do this since those values are determined at start up. How can I change that value at start up then?
to set the window size but I dont know what would happen if you tried to set it too a larger size than the current OS setup. You could use something like the below.
func _ready():
When something is true:
Resize_Screen(640, 480)
func Resize_Screen(First, Second):
OS.set_window_size(Vector2(First, Second))
Which would allow you to set the window size to anything you passed as arguments.
I don’t want to change the window size. I want to change the resolution of the game.
exuin | 2021-12-21 02:55
Check the TPS demo, the options part. It’s done with viewports. I dont remember more details by mind