Closed PraxTube closed 9 months ago
Yeah, that example is broken with bevy 0.12.0 I think the same is true for just bevy_asset_loader (given the right circumstances). Should be fixed by bevy 0.12.1 (when it releases; works with bevy main at least) Sorry for not documenting that correctly. You should still be able to use this crate with bevy_asset_loader If you load the animations separately or load the whole Animation2DSet (I think the collection(typed) was the Problem)
Ah okay yeah that makes sense. I also thought that the collection(typed)
was the issue, but the following still gives me the same panic.
#[asset(path = "gabe-idle-run.trickfilm#run")]
run_animation: Handle<AnimationClip2D>,
Not quite sure which AnimationSet2D
you mean.
Oh, you are right. Guess the option with AnimationClip2DSet
is the only option for now with bevy_asset_loader.
I created a branch with this example https://github.com/KirmesBude/bevy_trickfilm/blob/load_animation_set/examples/spritesheet_animation_asset_loader.rs. But as you can see it is noticeably worse to work with.
Edit for some additional explanation:
The trickfilm file always specifies a AnimationClip2DSet
, but it also contains "labeled assets" (that is what you can put after the hashtag) which will pull only that AnimationClip2D
out of the asset.
Ah okay nice, thanks! Yeah it is less elegant, but if it's going to be fixed in bevy 12.1 then it's alright. Also thanks for the explanation, that's helpful to know :)
I will leave the issue open until bevy 0.12.1 has been released. If you encounter any other problems (bugs or workflow) or have any suggestions, let me know :).
Seems reasonable, will do :+1:
bevy 0.12.1 came sooner than expected. Looks like the issue is fixed.
I get the following panic in the
spritesheet_animation_asset_loader
example.Not sure if I failed to set something up correctly, but the other two examples work just fine.