Skip to content

Conversation

@MrGVSV
Copy link
Member

@MrGVSV MrGVSV commented Jun 26, 2023

Objective

Followup to #6793.

Solution

Adds a dedicated example for the DynamicSceneBuilder.

@MrGVSV MrGVSV added C-Examples An addition or correction to our examples A-Scenes Serialized ECS data stored on the disk labels Jun 26, 2023
@MrGVSV MrGVSV mentioned this pull request Jun 26, 2023
10 tasks
@MrGVSV MrGVSV added this to the 0.11 milestone Jun 26, 2023
@cart cart modified the milestones: 0.11, 0.12 Jul 9, 2023
@MrGVSV MrGVSV marked this pull request as ready for review July 13, 2023 22:32
@MrGVSV MrGVSV modified the milestones: 0.12, 0.11.1 Jul 13, 2023
@MrGVSV
Copy link
Member Author

MrGVSV commented Jul 13, 2023

Moving this to the 0.11.1 milestone (feel free to change it if needed) since SceneFilter was actually merged into 0.11. It would be great if we could get it in with 0.11.1 so that it appears under the latest branch when going through the examples.

Copy link
Contributor

@SpecificProtagonist SpecificProtagonist left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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) {
Copy link
Contributor

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.

@cart cart removed this from the 0.11.1 milestone Aug 9, 2023
@alice-i-cecile
Copy link
Member

@MrGVSV the merge conflicts are really messy and confusing to review: do you think we should just remake this?

@joseph-gio joseph-gio self-requested a review October 17, 2023 23:26
@BenjaminBrienen BenjaminBrienen added D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Scenes Serialized ECS data stored on the disk C-Examples An addition or correction to our examples D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants