Generalise TemporaryRenderEntity over AppLabel#24419
Open
Zeophlite wants to merge 1 commit into
Open
Conversation
c0d0022 to
db237eb
Compare
TemporaryRenderEntity over AppLabel ( RenderApp in particular)
TemporaryRenderEntity over AppLabel ( RenderApp in particular)TemporaryRenderEntity over AppLabel
db237eb to
1c6fcc0
Compare
kfc35
approved these changes
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>); |
Contributor
There was a problem hiding this comment.
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>( |
Contributor
There was a problem hiding this comment.
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> |
Contributor
There was a problem hiding this comment.
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
bevy_extract#22852 )Solution
TemporaryRenderEntitywith a generic overAppLabel,TemporaryRenderEntitybecomes an alias overRenderAppTesting