Pausing scene
Pausing the scene and then resuming the scene causes the pause button to not work again.
The code that i am using is from the pause demo. func _ready(): # Initialization here connect("pressed",self,"on_pauseButton_pressed")
func on_pauseButton_pressed(): get_parent().get_node("PopupMenu").set_exclusive(true) get_parent().get_node("PopupMenu").popup() get_tree().set_pause(true)
and this is the code to go back to the scene.
func _process(delta): if(get_node("levelselect").is_pressed()): get_tree().set_pause(false) get_node("/root/global").goto_scene("res://Assets/scenes/levelSelector.scn") if(get_node("resume").is_pressed()): get_tree().set_pause(false) hide() if(get_node("restart").is_pressed()): get_tree().set_pause(false) get_node("/root/global").goto_scene("res://Assets/levels/level_1.scn")
If i restart or go back to level select the button works fine. The problem is only when resuming the game.