I have created a setting item on the main screen in Godot 4, but I want to create a setting item to change the screen size in the settings, and I am having trouble getting it to work, even after looking at references and such.
What I was hoping to do is to have a setting screen and be able to change the screen size with the left and right cross keys, but I have already finished programming the cross keys.
What we tried was to use the ProjectSettings
ProjectSettings.set_setting("display/window/size/width", 1920)
ProjectSettings.set_setting("display/window/size/height", 1080)
I tried to write the above but it does not work. Is there a function to apply it?