mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 06:22:01 +00:00
b9455afd0c
# Objective Resolves #13185 ## Solution Move the following methods from `sub_app` to the `Schedules` resource, and use them in the sub app: - `add_systems` - `configure_sets` - `ignore_ambiguity` Add an `entry(&mut self, label: impl ScheduleLabel) -> &mut Schedule` method to the `Schedules` resource, which returns a mutable reference to the schedule associated with the label, and creates one if it doesn't already exist. (build on top of the `entry(..).or_insert_with(...)` pattern in `HashMap`. ## Testing - Did you test these changes? If so, how? Added 4 unit tests to the `schedule.rs` - one that validates adding a system to an existing schedule, one that validates adding a system to a new one, one that validates configuring sets on an existing schedule, and one that validates configuring sets on a new schedule. - I didn't add tests for `entry` since the previous 4 tests use functions that rely on it. - I didn't test `ignore_ambiguity` since I didn't see examples of it's use, and am not familiar enough with it to know how to set up a good test for it. However, it relies on the `entry` method as well, so it should work just like the other 2 methods. |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_color | ||
bevy_compile_test_utils | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_dev_tools | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_ecs_compile_fail_tests | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_macros_compile_fail_tests | ||
bevy_math | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_reflect_compile_fail_tests | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |