bevy/crates/bevy_ecs/src
Christian Hughes 7e51f60de1
Add IntoSystem::with_input and ::with_input_from system wrappers (#18067)
# Objective

Originally [provided as a solution to a user's problem in
Discord](https://discord.com/channels/691052431525675048/1247654592838111302/1344431131277394042),
library authors might find the need to present user-registered systems
with system-specific data. Typically `Local<T>` is used for this type of
thing, but its not generally feasible or possible to configure/set the
underlying `T` data for locals. Alternatively, we can use `SystemInput`
to pass the data.

## Solution

- Added `IntoSystem::with_input`: Allows system-specific data to be
passed in explicitly.
- Added `IntoSystem::with_input_from`: Allows system-specific data to be
created at initialization time via `FromWorld`.

## Testing

Added two new tests, testing each of `with_input` and `with_input_from`.
2025-05-06 05:46:30 +00:00
..
entity implement MapEntities for higher-order types (#19071) 2025-05-06 05:24:37 +00:00
error Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
event Improve error message for missing events (#18683) 2025-04-02 19:25:48 +00:00
identifier bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
observer Merge ObserverState and Observer into single component (#18728) 2025-05-06 00:12:27 +00:00
query Let FilteredEntity(Ref|Mut) receive access when nested. (#18236) 2025-05-05 23:23:46 +00:00
reflect Replace VisitEntities with MapEntities (#18432) 2025-03-21 00:18:10 +00:00
relationship Add world and world_mut methods to RelatedSpawner (#18880) 2025-05-06 05:18:56 +00:00
schedule deprecate SimpleExecutor (#18753) 2025-05-06 00:21:57 +00:00
storage Fix sparse set components ignoring insert_if_new/InsertMode (#19059) 2025-05-05 17:42:36 +00:00
system Add IntoSystem::with_input and ::with_input_from system wrappers (#18067) 2025-05-06 05:46:30 +00:00
world Add EntityWorldMut::reborrow_scope() (#18730) 2025-05-06 00:19:56 +00:00
archetype.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
batching.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bundle.rs Add BundleRemover (#18521) 2025-05-05 23:55:04 +00:00
change_detection.rs Expose the added tick for change detection, both getting and setting. (#18746) 2025-04-08 21:13:27 +00:00
component.rs implement MapEntities for higher-order types (#19071) 2025-05-06 05:24:37 +00:00
entity_disabling.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
hierarchy.rs Increase upper limit of children! (#18865) 2025-05-06 00:58:30 +00:00
intern.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
label.rs do_not_recommend interned Labels (#17950) 2025-02-25 23:46:21 +00:00
lib.rs Derive clone_behavior for Components (#18811) 2025-05-06 00:32:59 +00:00
name.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
never.rs Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
removal_detection.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
resource.rs Move Resource trait to its own file (#17469) 2025-01-21 19:47:08 +00:00
spawn.rs Increase upper limit of children! (#18865) 2025-05-06 00:58:30 +00:00
traversal.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00