Incomplete path passed to tiled::parse_with_path
SarthakSingh31 opened this issue · 3 comments
├── Cargo.toml
├── src/
│ └── main.rs
├── assets/
│ ├── world.tmx
│ ├── tiles_world.tsx
│ └── tiles_world.png
For a project with the above file structure and where tiles_world.tsx
is an external tileset used by world.tmx
when we try to run asset_server.load("working_map.tmx")
Lines 25 to 32 in 2af6208
load_context.path()
returns the path relative to the assets folder (i.e. "world.tmx"
)
Lines 53 to 54 in 2af6208
this asset_path
is then used in tiled::parse_with_path
to resolve external tilesets which panics with
Other("External tileset file not found: \"tiles_world.tsx\"")
because it will try to look for "<execution path>/tiles_world.tsx"
instead of "<execution path>/assets/tiles_world.tsx"
shouldn't the path be relative to the world file and completely unrelated to the working directory?
while #52 fixes this when the project is run from its root, it is still broken when the project is e.g. a workspace member.
I am currently short on time so I can't submit a PR anytime soon, but if this is still broken when I have free time again I'll take a look at it