How to create @export variable for path to scene?

Godot Version

4.2.1

Question

I was wondering what the preferred way is to create an @export variable that references a scene. Right now I’m using

@export_file("*.tscn") var start_room:String

While this does give me a path to my scene that I can then load, if I move the file the variable will not be automatically updated to reflect the new location. I was wondering if there was something better than I String I could use to reference my scene?

@export var scene: PackedScene

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.