- Edited
Hello,
In my project, I load a scene randomly from a folder, like this:
var files: Array = DirAccess.get_files_at(folder_path)
var random_file = files.pick_random()
load(random_file).instantiate()
As I understood when a project is exported, the resource files are named with ".remap" suffix.
So on export I can't find my scene... My current solution is to trim the suffix of the scene path file:
load(random_file.trim_suffix(".remap")).instantiate()
What is the proper solution to load a file using DirAccess primary?
Related issue:
https://github.com/godotengine/godot/issues/66014
https://github.com/godotengine/godot/issues/25672