dtaralla / bevy-rrise

A Wwise Bevy integration
Other
11 stars 2 forks source link

Errors trying to run examples; presumed misconfiguration #1

Closed targrub closed 1 year ago

targrub commented 2 years ago

cargo run --features="bevy/render bevy_easings rrise/AkParametricEQFX" --example doppler_drone gets me the following error:

2022-08-29T19:10:11.287794Z DEBUG init_sound_engine: bevy_rrise::plugin: Memory manager initialized
2022-08-29T19:10:11.288584Z DEBUG init_sound_engine: bevy_rrise::plugin: Default streaming manager initialized
2022-08-29T19:10:11.288796Z DEBUG init_sound_engine: bevy_rrise::plugin: Current language set
2022-08-29T19:10:11.289519Z DEBUG init_sound_engine: bevy_rrise::plugin: Internal sound engine initialized
2022-08-29T19:10:11.289765Z DEBUG init_sound_engine: bevy_rrise::plugin: Internal music engine initialized
2022-08-29T19:10:11.291125Z DEBUG init_sound_engine: bevy_rrise::plugin: Profiling (comms) initialized
2022-08-29T19:10:11.291590Z ERROR bevy_rrise::plugin: Init.bnk could not be loaded; there will be no audio. Make sure you generate all soundbanks before running
2022-08-29T19:10:11.291738Z ERROR bevy_rrise::plugin: Unexpected Wwise error: "the operation failed"
thread 'Compute Task Pool (4)' panicked at 'called `Option::unwrap()` on a `None` value', examples\doppler_drone.rs:98:51
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library\core\src\panicking.rs:142
   2: core::panicking::panic
             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library\core\src\panicking.rs:48
   3: enum2$<core::option::Option<bevy_ecs::entity::Entity> >::unwrap<bevy_ecs::entity::Entity>
             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a\library\core\src\option.rs:775
   4: doppler_drone::setup_scene
             at .\examples\doppler_drone.rs:98
   5: core::ops::function::FnMut::call_mut<void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::change_detection::ResMut<bevy_asset::assets::Assets<bevy_render::mesh::mesh::Mesh> >,bevy_ecs::change_detection::ResMut<bevy_asset::assets::Assets<bevy_pbr::pbr_m
             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a\library\core\src\ops\function.rs:164

For music_visualizer, there are a number of could not find 'xbus' in 'rr' errors, etc., trying to compile.

On my own project it reports being unable to load Init.bnk, showing as an Ak_Fail error in the debugger.

I assume I'm not configured properly, but in what way?

dtaralla commented 2 years ago

Your two problems are actually just one.

From the log, you can see that Init.bnk could not be loaded. The init bank must be there in order to be able to play sounds. You should generate the example soundbanks before trying to run any examples. Just generate them from Wwise, as you would for any wwise project in Unity or Unreal. The example Wwise project should already be setup so that they are properly exported in assets/soundbanks, which is the default path where bevy-rrise will look for them.

Linked to that, if you never generated the soundbanks (or changed where they are stored from the Wwise project settings), the required rr:* bindings won't be generated as they depend on the soundbank generation metadata in the same folder.

I've added a line in the readme to make sure people don't forget to generate soundbanks before attempting to run or build the examples.

targrub commented 2 years ago

Examples now working fully, but my project, for which I have exported Init.bnk and mybank.bnk to myproject/assets, doesn't find Init.bnk or mybank.bnk. Also exported were Init.txt, mybank.txt, PluginInfo.xml, and SoundbanksInfo.xml. I've also then copied the .bnk and .txt files to myproject/assets/soundbanks. Still no go.

2022-09-04T15:22:43.299406Z ERROR bevy_rrise::plugin: Init.bnk could not be loaded; there will be no audio. Make sure you generate all soundbanks before running
2022-09-04T15:22:43.299643Z ERROR bevy_rrise::plugin: Unexpected Wwise error: "the operation failed"
Couldn't load SoundBank: "the operation failed"
targrub commented 2 years ago

I've also modified the Wwise "Project Settings | Soundbanks" (after cleaning out assets and assets/soundbanks) to export to assets/soundbanks with the same result. 2022-09-04 11_41_13-Project Settings

targrub commented 2 years ago

Also my BANK_PATH system variable is pointing to c:\users\...\assets\soundbanks and has no spaces in it.