Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JulioYagami |
I guess it could be done by using substr()
.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JulioYagami |
I guess it could be done by using substr()
.
Reply From: | Dlean Jeans |
Call String.get_basename() or get_base_dir():
var path = 'res://path/to/file.tres'
print(path.get_basename()) # res://path/to/file
print(path.get_base_dir()) # res://path/to
Click here to run the code above.