diff --git a/.gitignore b/.gitignore index b731be5..7bcd227 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target/ +assets/ *.lib *.dll demo_project/ diff --git a/README.md b/README.md index 3badb3c..dc828ef 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,9 @@ bevy_fmod = { git = "https://github.com/Salzian/bevy_fmod.git", tag = "v0.1.0" } ## Examples -This repository includes a `hello_world` example. In order to run it, you need -to [download the demo project][demo_project] (Google Drive link) and place it into the root of the -project: `./demo_project`. +FMOD Studio comes with an Examples project. Open it and build the project. Then put the bank files inside the assets folder of this repository. +You can also configure FMOD Studio to build to a folder you specify. +Run examples with `cargo run --example`. See the source code of the examples for more details. ## Versioning diff --git a/examples/minimal.rs b/examples/minimal.rs index 5cc760d..740e815 100644 --- a/examples/minimal.rs +++ b/examples/minimal.rs @@ -15,8 +15,9 @@ fn main() { DefaultPlugins, FmodPlugin { audio_banks_paths: &[ - "./demo_project/Build/Desktop/Master.bank", - "./demo_project/Build/Desktop/Master.strings.bank", + "./assets/Master.bank", + "./assets/Master.strings.bank", + "./assets/Music.bank", ], }, )) @@ -29,7 +30,7 @@ fn main() { struct MyMusicPlayer; fn startup(mut commands: Commands, studio: Res) { - let event_description = studio.0.get_event("event:/Return").unwrap(); + let event_description = studio.0.get_event("event:/Music/Level 03").unwrap(); commands .spawn(MyMusicPlayer) diff --git a/examples/spatial.rs b/examples/spatial.rs index 10fbd9a..9a4acdf 100644 --- a/examples/spatial.rs +++ b/examples/spatial.rs @@ -33,8 +33,9 @@ fn main() { DefaultPlugins, FmodPlugin { audio_banks_paths: &[ - "./demo_project/Build/Desktop/Master.bank", - "./demo_project/Build/Desktop/Master.strings.bank", + "./assets/Master.bank", + "./assets/Master.strings.bank", + "./assets/Music.bank", ], }, )) @@ -52,7 +53,7 @@ fn spawn_sound( studio: Res, input: Res>, ) { - let event_description = studio.0.get_event("event:/Return").unwrap(); + let event_description = studio.0.get_event("event:/Music/Radio Station").unwrap(); if input.just_pressed(KeyCode::F) { commands.spawn((