Move utilities from examples to bevy_state and add concept of state-scoped entities#13649
Merged
alice-i-cecile merged 19 commits intobevyengine:mainfrom Jun 4, 2024
Merged
Move utilities from examples to bevy_state and add concept of state-scoped entities#13649alice-i-cecile merged 19 commits intobevyengine:mainfrom
bevy_state and add concept of state-scoped entities#13649alice-i-cecile merged 19 commits intobevyengine:mainfrom
Conversation
bevy_statebevy_state and add concept of state-bound entities
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
jnhyatt
reviewed
Jun 3, 2024
orbachl-mcmaster
approved these changes
Jun 3, 2024
orbachl-mcmaster
left a comment
There was a problem hiding this comment.
I agree with Alice's comments, and otherwise am happy with this!
Member
|
I've added |
mockersf
reviewed
Jun 3, 2024
mockersf
reviewed
Jun 3, 2024
mockersf
reviewed
Jun 3, 2024
mockersf
requested changes
Jun 3, 2024
mockersf
reviewed
Jun 3, 2024
Co-authored-by: François Mockers <francois.mockers@vleue.com>
NiseVoid
reviewed
Jun 3, 2024
mockersf
reviewed
Jun 3, 2024
mockersf
reviewed
Jun 4, 2024
mockersf
reviewed
Jun 4, 2024
mockersf
reviewed
Jun 4, 2024
mockersf
reviewed
Jun 4, 2024
Co-authored-by: François Mockers <francois.mockers@vleue.com>
mockersf
approved these changes
Jun 4, 2024
Member
|
Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1347 if you'd like to help out. |
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
Move
StateScopedandlog_transitionstobevy_state, since they're useful for end users.Addresses #12852, although not in the way the issue had in mind.
Solution
bevy_hierarchyto default features ofbevy_state.log_transitionstotransitionsmodule.StateScopedtostate_scopedmodule, gated behindbevy_hierarchyfeature.enable_state_coped_entities<S: States>()to add required machinery toAppfor clearing state-scoped entities.Changelog
log_transitionsfor displaying state transitions.StateScopedfor binding entity lifetime to state and appenable_state_coped_entitiesto register cleaning behavior.