Hello, i have started to learn Godot with the course Godot 4: Build a 2D Action-Adventure Game. At the 3.6 about changing scene, i get a problem, the _on_body_entered start when i start the scene.
here is the code
func _on_body_entered(body: Node2D) -> void:
print("The player entered me!")
get_tree().change_scene_to_file("res://Scenes/DungeonScene/dungeon_scene.tscn")
func _on_body_exited(body: Node2D) -> void:
print("The body has exited me!")
pass # Replace with function body.
i’m with Godot 4.3
Here is the capture of my Area2D and my player. I don’t know why i see The player entered me! when i play the scene.
Any advice where i must look how to debug that?
Thanks for your help