Open
Description
Bevy version
0.16
What you did
I've turned on #![feature(default_field_values)]
for the crate and wanted to specify default values for my component struct. Like:
#[derive(Component, Default)]
pub struct ConveyorBelt {
pub speed: f32 = 1.0, // I get "expected ','" message here
}
What went wrong
It appears that #[derive(Component)]
does not work for structs which have default values in their declared fields.
Additional information
The main problem is that the diagnostics is very vague. I couldn't figure out that the issue is in Component derive implementation.