Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AnindyaRoy |
I wrote this code to make my game fullscreen and back to windowed during runtime in the script of my main menu. But it doesn’t seem to work even when I press the key in Main Menu
In case you are unable to see the image here is the code:
func _process(delta: float) → void:
if Input.is_action_just_pressed(“FullScreen”):
if ProjectSettings.get_setting(“display/window/size/fullscreen”):
ProjectSettings.set_setting(“display/window/size/fullscreen”, false)
else:
ProjectSettings.set_setting(“display/window/size/fullscreen”, true)