Trouv / bevy_ecs_ldtk

ECS-friendly ldtk plugin for bevy, leveraging bevy_ecs_tilemap
Other
674 stars 76 forks source link

Normalize resolved asset paths using `path_clean`. #255

Closed focustense closed 11 months ago

focustense commented 11 months ago

Makes all paths relative to the assets root. Ensures that LDtk-linked assets are shared with assets loaded by AssetServer, bevy_asset_loader and so on, as long as normalized paths are used for those (as they typically are), especially when the LDtk project is in a subdirectory.

Fixes #240

focustense commented 11 months ago

The failing test looks like a platform-specificity issue; the native Path must treat the backslash as just a regular character, so path_clean ignores it too. I'll look into fix tomorrow - probably just make that test case Windows-conditional.