+1 vote

My first attempt was changing it directly:


But it only affected Control nodes, and when the window had it size changed, even they reverted back to normal.

in Engine by (81 points)

2 Answers

–1 vote

You could do it in the project settings, under Display->Window set the Width and Height values to whatever you need.

by (563 points)

I need to do it while in-game.

You could do a little trick and use a Camera2D node and then zoom in an out whenever you need it.

Is there really no way of changing the root's size?

0 votes

OS.window__size=Vector2(width ,height)


by (108 points)

No, not window size, the viewport's size.

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 webmaster@godotengine.org with your username.