mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 18:13:10 +00:00
ba0f8f996f
# Objective Fix #10731. ## Solution Rename `App::add_state<T>(&mut self)` to `init_state`, and add `App::insert_state<T>(&mut self, state: T)`. I decided on these names because they are more similar to `init_resource` and `insert_resource`. I also removed the `States` trait's requirement for `Default`. Instead, `init_state` requires `FromWorld`. --- ## Changelog - Renamed `App::add_state` to `init_state`. - Added `App::insert_state`. - Removed the `States` trait's requirement for `Default`. ## Migration Guide - Renamed `App::add_state` to `init_state`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |