- Edited
In godot 4.0.2, I am using get_tree().change_scene_to_file("res://level_2.tscn")
and it is saying that the scene does not exist. I cheked and it does, I also draged the scenes name directly from the file manager, and it didnt work. Wierd thing is I am calling the exact same line of code in a different script, and it works there. I tried the same thing with get_tree().change_scene_to_packed(load("res://level_2.tscn"))
and it doesn't work aswell. Mysterious bahavior. I am sure the file exists and I copied the name correctly. Note I am passing in an exported variable to the function.
What could the problem be ? Also how do you export variable with the file selection popup like you could do export(FILE, String)
in Godot ?