#How to set window size with editor plugin?
5 messages · Page 1 of 1 (latest)
This is the method which sets the width and height override to the predefined values
func set_window_size(window_size: Vector2i):
ProjectSettings.set_setting("display/window/size/window_width_override", window_size.x)
ProjectSettings.set_setting("display/window/size/window_height_override", window_size.y)```
```Python
func _on_screen_res_presets_item_selected(index: int) -> void:
match index:
0: set_window_size(Vector2i(1920, 1080))
1: set_window_size(Vector2i(1280, 720))
2: set_window_size(Vector2i(720, 480))```
if i run the game, everything works as it should but its not working in the editor
what im not understanding is that, its getting changed here in the project settings with the new resolution
but it doesn't change the window size