bevy/crates
TheBigCheese 86bd648570
Added an init_bundle method to World (#12573)
# Objective
Make it easy to get the ids of all the components in a bundle (and
initialise any components not yet initialised). This is fairly similar
to the `Bundle::get_component_ids()` method added in the observers PR
however that will return none for any non-initialised components. This
is exactly the API space covered by `Bundle::component_ids()` however
that isn't possible to call outside of `bevy_ecs` as it requires `&mut
Components` and `&mut Storages`.

## Solution
Added `World.init_bundle<B: Bundle>()` which similarly to
`init_component` and `init_resource`, initialises all components in the
bundle and returns a vector of their component ids.

---

## Changelog
Added the method `init_bundle` to `World` as a counterpart to
`init_component` and `init_resource`.

---------

Co-authored-by: James Liu <contact@jamessliu.com>
2024-03-24 23:48:51 +00:00
..
bevy_a11y Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_animation Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_app Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_asset Fix get_asset_paths not properly deleting empty folders (& recursive async functions) (#12638) 2024-03-23 03:35:51 +00:00
bevy_audio Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_color FIX12527: Changes to make serde optional for bevy_color (#12666) 2024-03-24 08:55:34 +00:00
bevy_core Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_core_pipeline Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_derive Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_dev_tools Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_diagnostic Make SystemInfo a Resource (#12584) 2024-03-23 06:16:02 +00:00
bevy_dylib Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_dynamic_plugin Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_ecs Added an init_bundle method to World (#12573) 2024-03-24 23:48:51 +00:00
bevy_ecs_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_encase_derive Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_gilrs Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_gizmos Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_gltf Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_hierarchy Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_input Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_internal FIX12527: Changes to make serde optional for bevy_color (#12666) 2024-03-24 08:55:34 +00:00
bevy_log Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_macro_utils Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_macros_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_math Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_mikktspace Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_panic_handler Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_pbr Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_ptr Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_reflect Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_reflect_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_render Add iOS to synchronous_pipeline_compilation docs (#12694) 2024-03-24 22:01:55 +00:00
bevy_scene Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_sprite Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_tasks Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_text Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_time Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_transform Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_ui fix: make WebGPU shader work again (#12683) 2024-03-24 10:29:39 +00:00
bevy_utils Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_window Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
bevy_winit Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00