-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update bevy to 0.12.0 and update breaking changes #46
base: main
Are you sure you want to change the base?
Conversation
src/lib.rs
Outdated
/// .run() | ||
/// ``` | ||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why exactly is this lint here? Just asking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think sample_rate
only gets set via the tests.
without this Rust reports,
warning: field `sample_rate` is never read
--> src/lib.rs:56:5
|
55 | pub struct DspPlugin {
| --------- field in this struct
56 | sample_rate: f32,
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Let me know if there is another or better way to resolve this warning.
src/lib.rs
Outdated
@@ -88,8 +87,8 @@ impl Default for DspPlugin { | |||
|
|||
impl Plugin for DspPlugin { | |||
fn build(&self, app: &mut App) { | |||
app.insert_resource(DspManager::new(self.sample_rate)) | |||
.add_asset::<DspSource>(); | |||
app.init_resource::<DspManager>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is init_resource
used instead of insert_resource
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this ❤️. I thought insert_resource
was deprecated, but only add_asset
was. This also works with insert_resource
so I will switch it back.
ef4ce3a
to
cdf81a3
Compare
I updated Kira as well since it already supports Bevy 0.12.0. Looks like oddio might need a patch to support bevy 0.12.0. |
👋 Hey thanks for the great project!
I want to try it out and I started with Bevy 0.12.0, so I took the liberty of updating this library to use bevy 0.12.0 and updated the incompatible APIs.