+3 votes

Is there a way to do this So that for example i can click a button and the window size goes from say 480p to 720p without needing for people to Manually resize the window?

in Engine by (483 points)

1 Answer

+10 votes

You should use OS::set_window_size for this.

func _ready():
    get_node("480p_button").connect("pressed", self, "resize_to_480p")

func resize_to_480p():
    OS.set_window_size(Vector2(640, 480))
by (1,602 points)
edited by
Alright, thanks for the help ^^
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.