File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
release-content/0.16/migration-guides Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1+ In Bevy 0.16 you can now use ` #[derive(Event)] ` for more specialized implementations.
2+
3+ ``` rust
4+ // 0.15
5+ struct MyEvent ;
6+
7+ impl Event for MyEvent {
8+ const AUTO_PROPAGATE : bool = true ;
9+ type Traversal = & 'static ChildOf
10+ }
11+
12+ // 0.16
13+ #[derive(Event )]
14+ #[event(traversal = & 'static ChildOf , auto_propagate)]
15+ struct MyEvent ;
16+ ```
Original file line number Diff line number Diff line change @@ -448,6 +448,12 @@ prs = [16139]
448448areas = [" ECS" , " Reflection" ]
449449file_name = " 16139_ReflectBundleremove_improvement.md"
450450
451+ [[guides ]]
452+ title = " Improved `#[derive(Event)]`"
453+ prs = [18083 ]
454+ areas = [" ECS" ]
455+ file_name = " 18083_Improved_DeriveEvent.md"
456+
451457[[guides ]]
452458title = " Gamepad improvements"
453459prs = [16222 ]
@@ -1017,4 +1023,4 @@ file_name = "18326_Use_4byte_LightmapSlabIndex_for_batching_instead_of_16byte.md
10171023title = " Use `target_abi = \" sim\" ` instead of `ios_simulator` feature"
10181024prs = [17702 ]
10191025areas = []
1020- file_name = " 17702_Use_target_abi__sim_instead_of_ios_simulator_feature.md"
1026+ file_name = " 17702_Use_target_abi__sim_instead_of_ios_simulator_feature.md"
You can’t perform that action at this time.
0 commit comments