Closed JoshLee0915 closed 3 years ago
For the moment I feel the best way to go about this is to check if there is a file extension and if not append .tscn by default. This keeps some of the usability intact that comes from being able to specify the scene without the file extension while helping to avoid possible conflicts in a majority of cases.
Not the best solution possibly but clean and simple.
The current way the system is setup is it searches for the first file with the entered
_Node
name in its path. This is very user friendly but error prone as this system could easily load the incorrect file if the name appears anywhere in the path and the extension is not specified.Also if any folders use a class name it could cause a file to be loaded when a class should of.
A few solutions are to ascertain if a scene or a class should be loaded by if a file extension was used or not in
_Node
, force exact match, or require extensions for scenes (similar to the first option but a bit different in implementation)