You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm tinkering with bevy_ecs and just realized that its README is not up-to-date with the recent change making #[derive(Component)] mandatory for all component structs.
// Create a new empty World to hold our Entities and Components
letmutworld=World::new();
// Spawn an entity with Position and Velocity components
world.spawn()
.insert(Position { x:0.0, y:0.0 })
.insert(Velocity { x:1.0, y:0.0 });
// Create a new Schedule, which defines an execution strategy for Systems
letmutschedule=Schedule::default();
Attempt to run the example would result in errors as below
the trait `bevy_ecs::component::Component` is not implemented for `Position`
the trait `bevy_ecs::component::Component` is not implemented for `Velocity`
Also, it could be worth it to mention that components are Rust structs but also need to implement bevy_ecs's Component trait.
Hi everyone,
I'm tinkering with
bevy_ecs
and just realized that its README is not up-to-date with the recent change making#[derive(Component)]
mandatory for all component structs.Specifically
bevy/crates/bevy_ecs/README.md
Lines 100 to 130 in 6a8a8c9
Attempt to run the example would result in errors as below
Also, it could be worth it to mention that components are Rust structs but also need to implement bevy_ecs's
Component
trait.bevy/crates/bevy_ecs/README.md
Lines 25 to 29 in 6a8a8c9
The text was updated successfully, but these errors were encountered: