Skip to content

Generalise TemporaryRenderEntity over AppLabel#24419

Open
Zeophlite wants to merge 1 commit into
bevyengine:mainfrom
Zeophlite:extract-extract4a
Open

Generalise TemporaryRenderEntity over AppLabel#24419
Zeophlite wants to merge 1 commit into
bevyengine:mainfrom
Zeophlite:extract-extract4a

Conversation

@Zeophlite
Copy link
Copy Markdown
Contributor

@Zeophlite Zeophlite commented May 24, 2026

Objective

Solution

  • Replace TemporaryRenderEntity with a generic over AppLabel, TemporaryRenderEntity becomes an alias over RenderApp

Testing

  • CI

@Zeophlite Zeophlite force-pushed the extract-extract4a branch from c0d0022 to db237eb Compare May 24, 2026 09:44
@Zeophlite Zeophlite changed the title TemporaryRenderEntity is a RenderApp specific Generalise TemporaryRenderEntity over AppLabel ( RenderApp in particular) May 24, 2026
@Zeophlite Zeophlite changed the title Generalise TemporaryRenderEntity over AppLabel ( RenderApp in particular) Generalise TemporaryRenderEntity over AppLabel May 24, 2026
@Zeophlite Zeophlite force-pushed the extract-extract4a branch from db237eb to 1c6fcc0 Compare May 24, 2026 12:56
@Zeophlite Zeophlite added A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels May 24, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering May 24, 2026
@Zeophlite Zeophlite added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels May 24, 2026
@Zeophlite Zeophlite marked this pull request as ready for review May 24, 2026 14:19
@Zeophlite Zeophlite requested a review from atlv24 May 24, 2026 14:19
@Zeophlite Zeophlite mentioned this pull request May 24, 2026
@Zeophlite Zeophlite added this to the 0.20 milestone May 24, 2026
#[derive(Component, Copy, Clone, Debug, Default, Reflect)]
#[reflect(Component, Default, Clone)]
pub struct TemporaryRenderEntity;
pub struct TemporarySubEntity<L: AppLabel + Clone + Eq + Copy + Default>(PhantomData<L>);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of Sub, maybe TemporaryOtherWorldEntity? or even just TemporaryEntity. The Sub doesn’t really mean much to the user by itself

}

pub(crate) fn despawn_temporary_render_entities(
pub(crate) fn despawn_temporary_render_entities<L: AppLabel + Copy + Default + Eq>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this will be generalized, I’d remove the render part of the fn name

Suggested change
pub(crate) fn despawn_temporary_render_entities<L: AppLabel + Copy + Default + Eq>(
pub(crate) fn despawn_temporary_entities<L: AppLabel + Copy + Default + Eq>(

// is running in parallel with the main app.
apply_extract_commands.in_set(RenderSystems::ExtractCommands),
despawn_temporary_render_entities.in_set(RenderSystems::PostCleanup),
despawn_temporary_render_entities::<RenderApp>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if accepting my previous suggestion about removing the render part of the fn name

Suggested change
despawn_temporary_render_entities::<RenderApp>
despawn_temporary_entities::<RenderApp>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

2 participants