-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add app.add_state(inital_state) convenience method #10731
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
What problem does this solve or what need does it fill?
I want to initialize a state to an arbitrary state, not just default.
Right now I am using
app.add_state::<MyState>()What solution would you like?
Add a convenience method
app.add_state(MyState::MyArbitraryState)toAppWhat alternative(s) have you considered?
I read through the motivation for the new state system but it doesn't mention why only the default trait is used for initialization. This seems like a clear win to me so I would be surprised at any objections.