Function de_core::assets::asset_path
source · pub fn asset_path<P: AsRef<Path>>(path: P) -> PathBuf
Expand description
Converts a path relative to assets directory to an absolute path.
If the game is executed with Cargo, the path is interpreted as relative to assets/ directory in the directory with Cargo manifest file.
Otherwise, it is interpreted as relative to assets/ directory in the directory with the binary.
§Panics
Panics if path
is not relative.