Skip to content

Remove redundant attribute #[states(scoped_entities)] from examples. - #25790

Merged
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
swoobie:states-example-update
Sep 15, 2026
Merged

alice-i-cecile merged 1 commit into
bevyengine:mainfrom
swoobie:states-example-update

Conversation

@swoobie

@swoobie swoobie commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The default behavior for state scoped entities was changed to an opt-out, instead of opt-in during the migration from 0.16 to 0.17. These examples are still using the attribute as an explicit opt-in.

See: https://bevy.org/learn/migration-guides/0-16-to-0-17/#state-scoped-entities-are-now-always-enabled-implicitly

Objective

  • Tidy up State examples using the implicitly enabled attribute with an explicit declaration.

Solution

  • Remove #[states(scoped_entities)] attribute line for States used in the examples.

Testing

  • Did you test these changes? If so, how?

Tested the examples locally with these CLI commands:

  1. cargo run --color=always --package bevy --example testbed_ui --profile dev
  2. cargo run --color=always --package bevy --example sub_states --profile dev --features=bevy_dev_tools

@github-actions

Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it A-States App-level states machines labels Sep 14, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 15, 2026
Merged via the queue into bevyengine:main with commit 997c1b6 Sep 15, 2026
47 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 C-Examples An addition or correction to our examples D-Trivial Nice and easy! A great choice to get started with Bevy 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.

2 participants