bevy/examples/ecs
JaySpruce 058497e0bb
Change Commands::get_entity to return Result and remove panic from Commands::entity (#18043)
## Objective

Alternative to #18001.

- Now that systems can handle the `?` operator, `get_entity` returning
`Result` would be more useful than `Option`.
- With `get_entity` being more flexible, combined with entity commands
now checking the entity's existence automatically, the panic in `entity`
isn't really necessary.

## Solution

- Changed `Commands::get_entity` to return `Result<EntityCommands,
EntityDoesNotExistError>`.
- Removed panic from `Commands::entity`.
2025-02-27 21:05:16 +00:00
..
change_detection.rs Rename track_change_detection flag to track_location (#17075) 2025-01-01 18:43:47 +00:00
component_hooks.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
custom_query_param.rs Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
custom_schedule.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
dynamic.rs Improved Entity Mapping and Cloning (#17687) 2025-02-06 22:13:41 +00:00
ecs_guide.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
entity_disabling.rs Add entity disabling example (#17710) 2025-02-09 19:16:48 +00:00
event.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
fallible_params.rs Renamed members of ParamWarnPolicy to reflect new behaviour. (#17311) 2025-01-12 05:40:04 +00:00
fallible_systems.rs Deterministic fallible_systems example (#17813) 2025-02-11 23:54:20 +00:00
fixed_timestep.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
generic_system.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
hierarchy.rs Add an example teaching users about custom relationships (#17443) 2025-01-20 23:17:38 +00:00
immutable_components.rs Improved Entity Mapping and Cloning (#17687) 2025-02-06 22:13:41 +00:00
iter_combinations.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
nondeterministic_system_order.rs Fix non-functional nondeterministic_system_order example (#10719) 2023-11-25 21:13:35 +00:00
observer_propagation.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
observers.rs Change Commands::get_entity to return Result and remove panic from Commands::entity (#18043) 2025-02-27 21:05:16 +00:00
one_shot_systems.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
parallel_query.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
relationships.rs Add an example teaching users about custom relationships (#17443) 2025-01-20 23:17:38 +00:00
removal_detection.rs Rename trigger.entity() to trigger.target() (#16716) 2024-12-08 21:55:09 +00:00
run_conditions.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
send_and_receive_events.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
startup_system.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
system_closure.rs Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
system_param.rs Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
system_piping.rs Fix a few typos (#17292) 2025-01-10 22:48:30 +00:00
system_stepping.rs Remove stepping from default features (#12847) 2024-04-03 19:16:02 +00:00