mirror of
https://github.com/bevyengine/bevy
synced 2024-11-29 08:00:20 +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`. |
||
---|---|---|
.. | ||
2d_gizmos.rs | ||
2d_shapes.rs | ||
2d_viewport_to_world.rs | ||
bloom_2d.rs | ||
custom_gltf_vertex_attribute.rs | ||
mesh2d.rs | ||
mesh2d_manual.rs | ||
mesh2d_vertex_color_texture.rs | ||
move_sprite.rs | ||
pixel_perfect.rs | ||
rotation.rs | ||
sprite.rs | ||
sprite_flipping.rs | ||
sprite_sheet.rs | ||
text2d.rs | ||
texture_atlas.rs | ||
transparency_2d.rs |