Direct users to commands.set_state instead of NextState
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
Second thoughts, I'd like this to be the standard way of updating states.
Using commands:
- implies the deferred nature of this operation
- reduces clutter associated with `NextState`, especially when many are used
- does not make problems with system ambiguities worse
- allows for falliable operations with a warning, which we will need when the traits get unified and not everything will use `NextState`
- with a different command you can force the transition to happen immediately without writing an exclusive system
I don't think this change has to happen now, but it looks like a better API overall to me
_Originally posted by @MiniaczQ in https://github.com/bevyengine/bevy/issues/15083#issuecomment-2338608883_
Contributor guide
Research direction
Start by reading the commands.set_state and NextState APIs referenced in the issue and review the surrounding discussion. No files or tests are identified in the payload. Done would mean an agreed API direction and corresponding changes that consistently direct users toward commands.set_state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100