mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
2ea8d35900
# Objective The method names on `DynamicSceneBuilder` are misleading. Specifically, `deny_all` and `allow_all` implies everything will be denied/allowed, including all components and resources. In reality, these methods only apply to components (which is mentioned in the docs). ## Solution - change `deny_all` and `allow_all` to `deny_all_components` and `allow_all_components` - also, change the remaining methods to mention component where it makes sense We could also add the `deny_all` and `allow_all` methods back later, only this time, they would deny/allow both resources and components. ## Showcase ### Before ```rust let builder = DynamicSceneBuilder::from_world(world) .deny_all() .deny_all_resources() .allow::<MyComponent>(); ``` ### After ```rust let builder = DynamicSceneBuilder::from_world(world) .deny_all_components() .deny_all_resources() .allow_component::<MyComponent>(); ``` ## Migration Guide the following invocations on `DynamicSceneBuilder` should be changed by users - `with_filter` -> `with_component_filter` - `allow` -> `allow_component` - `deny` -> `deny_component` - `allow_all` -> `allow_all_components` - `deny_all` -> `deny_all_components` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |