Godot Version
Godot_v4.3-beta1_win64
###Problem
I created three scenes: intro, menu and game. I made it possible to skip two scenes: intro and menu. When I tried to load the third game scene I got an error:
Parent node is busy adding/removing children, remove_child()
can’t be called at this time. Consider using remove_child.call_deferred(child)
instead.
The code for changing the scene looks like this:
#intro
func _ready() -> void:
if skip_scene:
get_tree().change_scene_to_file("res://menu.tscn")
#menu
func _ready() -> void:
if skip_scene:
get_tree().change_scene_to_file("res://game.tscn")
Question
Is this normal behavior of Godot engine? How to bypass this error (intro and menu must be called)?