Closed LeCalicot closed 2 years ago
Hey there!
Sorry for the delay, I've been unavailable for the last bit, but I'm going to test this out and see why it's not working as soon as I can. It should be a simple fix, one way or the other.
I think I know what the problem is now. When creating a standalone project, you aren't meant to depend on the individual bevy_retrograde_[something]
crates by themselves. You only need to depend on the bevy_retrograde
crate. The bevy_retrograde
crate is the one responsible for enabling certain Bevy plugins, which is why you are getting the panic.
I created a new project from scratch and created a GitHub gist with the Cargo.toml
and main.rs
file that I used and it worked fine. Let me know if this doesn't work for you!
https://gist.github.com/zicklag/06f7bd82afa81bc8f45b4e92ab866658
That did the trick! Thanks for the help!
Hi,
first, thanks for the great work, it looks promising! I'm new to bevy and rust, thanks for your patience. I was trying to adapt the ldtk map loading for my project and I encountered some issues. I think it's a bug, but not 100% sure.
First, to test it, I ran the actual ldtk_map.rs example from the cloned repo, it works fine. Then, I moved the example to main.rs. It still compiles fine. Then, I also linked to the online crates what I could.
At this point I have:
that I can run with cargo run. This runs fine. The _bevyretrograde is still loaded from the lib.rs !
Then I copy the exact same code (main.rs and Cargo.toml) to my project. The difference is that the lib.rs is not present, so I add the line:
bevy_retrograde = "0.2"
in the Cargo.toml file.But somehow running the same code from my project, it still compiles fine, but when running it, it panics:
Finished dev [unoptimized] target(s) in 26.22s Running
target/debug/my_projectOct 02 21:25:26.869 WARN bevy_asset::asset_server: no
AssetLoaderfound for the following extension: ldtk thread 'Compute Task Pool (4)' panicked at 'Requested resource does not exist: bevy_asset::assets::Assets<bevy_retrograde_ldtk::asset::LdtkMap>', /home/luc/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.5.0/src/system/system_param.rs:244:17 note: run with
RUST_BACKTRACE=1environment variable to display a backtrace thread 'main' panicked at 'task has failed', /home/luc/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.0.3/src/task.rs:368:45
However, if I copy the lib.rs from the repo, it compiles and run fine (all the code is identical, so...yeah, makes sense ^^) if I include the lib:
Am I missing something or is there an issue with loading the ldtk plugin from the crate?