Skip to content

Follow up on Retained Rendering #15459

Closed
1 of 1 issue completed
Closed
1 of 1 issue completed
@Trashtalk217

Description

@Trashtalk217

Merging #15320 leaves behind a couple of gaps that can be easily filled in a follow-up PR(s).

Implement WorldQuery for RenderEntity and MainEntity

When querying &RenderEntity currently from within the main world (or Extract systems in the render world), you constantly have to call .id() on every thing you query, because RenderEntity is a component that contains an entity. This indirection is annoying and makes the migration to 0.15 more cumbersome (more line changes), so we can implement a custom WorldQuery so that this happens automatically (think of querying Entity).

The same is true for MainEntity.

Using required components

There are a couple of places, mainly in bevy_render/src/extract_component.rs where SyncToRenderWorld is automatically added to certain components. This is currently done with observers, but it's much better to do this with required components. This is being tackled in #15582.

Deprecating get_or_spawn

get_or_spawn Is quite often used in extraction systems, given how things used to work. But with a retained rendering world, the entity should always already exist, so just get should suffice.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsA-NetworkingSending data between clients, servers and machinesA-RenderingDrawing game state to the screenC-Code-QualityA section of code that is hard to understand or changeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useS-BlockedThis cannot move forward until something else changesX-ContentiousThere are nontrivial implications that should be thought through

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions