mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
6fbd585d78
# Objective After the Gizmos changes, `App::init_gizmos_group` turned into a important function that for sure mustn't panic. The problem is: the actual implementation causes a panic if somehow the code is runned before `GizmoPlugin` was added to the App - The error occurs here for example: ```rust fn main() { App::new() .init_gizmo_group::<MyGizmoConfig>() .add_plugins(DefaultPlugins) .run(); } #[derive(Default, Reflect, GizmoConfigGroup)] struct MyGizmoConfig; ``` ![image](https://github.com/bevyengine/bevy/assets/126117294/35e75608-0946-4320-8035-00a82562e37e) ## Solution - Instead of panicking when getting `GizmoConfigStore`, insert the store in `App::init_gizmos_group` if needed --- ## Changelog ### Changed - Changed App::init_gizmos_group to insert the resource if it don't exist ### Removed - Removed explicit init of `GizmoConfigStore` --------- Co-authored-by: François <mockersf@gmail.com> |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml |