Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MikeMikeMike |
Hi…,
my fileSystem looks like this:
res://
level
player
player_script.gd
media
jump_sound.wav
so the absolute path for my sound file is "res://level/player/media/jump_sound.wav"
.
In player_script.gd I would like to load jump_sound.wav with a relative path like this (because, when I move the folder player, the script is broken with an absolute path):
var jump_sound = load("media/jump_sound.wav") # doesn't work
Is there a way for relative load paths in GDscript?
Thanks
Mike