fishfolk / punchy

A 2.5D side-scroller beatemup, made in Bevy
https://fishfolk.github.io/punchy/player/latest
Other
271 stars 32 forks source link

Audio system panic on using Color Picker widget in egui_inspector debugtools #271

Closed odecay closed 2 years ago

odecay commented 2 years ago

Description

Panic due to unwrapping in menu audio sound effect system on label.

To Reproduce

  1. run with `cargo run -- -d
  2. press f10 to start egui_inspector
  3. select the TextureAtlasSprite component on one of the fighter entities
  4. click the color field

Game panics with

thread 'Compute Task Pool (0)' panicked at 'called `Option::unwrap()` on a `None` value', src/audio.rs:105:36
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'task has failed', /home/otis/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.3.0/src/task.rs:426:43

Expected Behavior

Color picker shows, allowing change of color field.

This does happen if main_menu_sounds system is disabled in main.rs.