Implemented #[bundle(ignore)] and #[bundle(nest)]#5579
Implemented #[bundle(ignore)] and #[bundle(nest)]#5579maccesch merged 0 commit intobevyengine:mainfrom
#[bundle(ignore)] and #[bundle(nest)]#5579Conversation
I'm fine with this limitation as this feature is overwhelmingly going to be used for |
|
From a user perspective, I like this change. I tested the changes with a field with [bundle(ignore)] that doesn't implement Default and the error message is clear that you need to impl Default FWIW. |
|
Breaking change since |
crates/bevy_ecs/src/bundle.rs
Outdated
| /// a: A, | ||
| /// z: Z, | ||
| /// #[bundle(ignore)] | ||
| /// other: Other, |
There was a problem hiding this comment.
IMO we should use a PhantomData type + a bundle generic here, as it much more clearly motivates this feature.
There was a problem hiding this comment.
In the new PR I added the PhantomData but left this because I figured it demonstrates the Default trait requirement. Let me know if you want me to remove it.
crates/bevy_ui/src/ui_node.rs
Outdated
|
|
||
| /// An enum that describes possible types of value in flexbox layout options | ||
| /// | ||
| /// There are numeric traits implemented for this enum so you can multiply, divide, add, and subtract |
There was a problem hiding this comment.
These changes are unrelated; please remove them :)
There was a problem hiding this comment.
oh sorry! that must have slipped in somehow!
There was a problem hiding this comment.
Due to a bug in GitHub I had to create another PR for this: #5628
Objective
Fixes #5559
Solution
Because the generated method
from_components()creates an instance ofSelfmy implementation requires any field type that is marked to be ignored to implementDefault.Migration Guide
In
#[derive(Bundle)]structs:#[bundle]=>#[bundle(nest)]