Skip to content

Always enable state scoped entities#20883

Merged
alice-i-cecile merged 7 commits intobevyengine:mainfrom
janhohenheim:yeet-enable-scope
Sep 8, 2025
Merged

Always enable state scoped entities#20883
alice-i-cecile merged 7 commits intobevyengine:mainfrom
janhohenheim:yeet-enable-scope

Conversation

@janhohenheim
Copy link
Copy Markdown
Member

Objective

Solution

  • Just enable state scoped entities all the time. No need to keep API surface for disabling that tiiiiiny bit of overhead. If someone needs this, we can still trivially add it back.

Testing

  • bevy run --example state_scope

@janhohenheim janhohenheim added this to the 0.17 milestone Sep 5, 2025
@janhohenheim
Copy link
Copy Markdown
Member Author

Putting it in the milestone because it fixes a milestone issue

@janhohenheim janhohenheim added M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide D-Straightforward Simple bug fixes and API improvements, docs, test and examples A-States App-level states machines labels Sep 5, 2025
Copy link
Copy Markdown
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

So much simpler. I really don't think that shaving off this overhead is worth the complexity budget here. The true minimalists can always fork bevy_state and delete this if they don't want it.

@alice-i-cecile alice-i-cecile added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Sep 5, 2025
@janhohenheim janhohenheim added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 6, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 8, 2025
Merged via the queue into bevyengine:main with commit 9ea6b13 Sep 8, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-States App-level states machines D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using enable_state_scoped_entities will try to despawn entities twice, resulting in warnings

3 participants