changed change scene to file to call deffered so the current process ends before changing the scene
This commit is contained in:
@@ -8,8 +8,9 @@ func _ready() -> void:
|
||||
|
||||
|
||||
|
||||
func ChangeSceneNewGame():
|
||||
get_tree().change_scene_to_file("res://Scenes/Levels/office.tscn")
|
||||
|
||||
func _on_new_game_button_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://Scenes/Levels/office.tscn")
|
||||
print("changed")
|
||||
call_deferred("ChangeSceneNewGame")
|
||||
pass # Replace with function body.
|
||||
|
||||
Reference in New Issue
Block a user