-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
examples: Add scene_builder example
#8955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Moving this to the 0.11.1 milestone (feel free to change it if needed) since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos from the scene filter PR. The example looks good to me for the most part.
That said, it shows that something's missing in the DynamicSceneBuilder docs: By default, everything is allowed, so allow should be a no-op, but instead it denies everything else (unless there already was an allow/deny, with unintuitive results, such as .deny(A).allow(A) allowing everything but .allow(A).deny(A).allow(A) denying everything).
The doc could also mention what happens if all components of an entity get filtered out (does it get serialized as an empty entity, or not at all? I'm guessing the former, but confirmation would be nice).
| /// | ||
| /// # Component Extraction | ||
| /// | ||
| /// By default, all components registered with [`ReflectComponent`] type data in a world's [`AppTypeRegistry`] will be extracted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// By default, all components registered with [`ReflectComponent`] type data in a world's [`AppTypeRegistry`] will be extracted. | |
| /// By default, all components registered with [`ReflectComponent`] type data in a world's [`AppTypeRegistry`] will be extracted |
| /// | ||
| /// # Resource Extraction | ||
| /// | ||
| /// By default, all resources registered with [`ReflectResource`] type data in a world's [`AppTypeRegistry`] will be extracted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// By default, all resources registered with [`ReflectResource`] type data in a world's [`AppTypeRegistry`] will be extracted. | |
| /// By default, all resources registered with [`ReflectResource`] type data in a world's [`AppTypeRegistry`] will be extracted |
|
|
||
| // This is only necessary for the info message in the UI. See examples/ui/text.rs for a standalone | ||
| // text example. | ||
| fn infotext_system(mut commands: Commands) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The window doesn't need to stay open, so create_snapshot could just fire an AppExit event.
|
@MrGVSV the merge conflicts are really messy and confusing to review: do you think we should just remake this? |
Objective
Followup to #6793.
Solution
Adds a dedicated example for the
DynamicSceneBuilder.