StarArawn / bevy_tiled

A plugin for rendering tiled maps.
MIT License
151 stars 40 forks source link

wasm builds fail on get_root_path #54

Closed rparrett closed 3 years ago

rparrett commented 3 years ago

Since eb124a30babf3b42ea9ad107653aee0570c678b6

error[E0599]: no function or associated item named `get_root_path` found for struct `WasmAssetIo` in the current scope
  --> /Users/robparrett/.cargo/git/checkouts/bevy_tiled-85a429c236b45725/d997e92/src/map.rs:61:44
   |
61 |         let root_dir = asset::WasmAssetIo::get_root_path();
   |                                            ^^^^^^^^^^^^^ function or associated item not found in `WasmAssetIo`

Things are generally working very well prior to this commit.

rparrett commented 3 years ago

It seems that AndroidAssetIo also does not have get_root_path.

dmtaub commented 3 years ago

Oof. OK - any ideas what we can do there? Thanks for trying it out - I don't build for Wasm right now, so I was hoping someone who does would test this. Perhaps I should revert for now...

rparrett commented 3 years ago

I'm not sure. I might be able to test more later tonight.

Is create_platform_default_asset_io() (and .path on the resulting AssetIo) something that would help?

rparrett commented 3 years ago

This may be of interest to @SarthakSingh31 @f-hanzlik