bevy/crates/bevy_ecs/src
Jerome Humbert f4776f2ec4 Add entity ID to expect() message (#2943)
Add the entity ID and generation to the expect() message of two
world accessors, to make it easier to debug use-after-free issues.
Coupled with e.g. bevy-inspector-egui which also displays the entity ID,
this makes it much easier to identify what entity is being misused.

# Objective

Make it easier to identity an entity being accessed after being deleted.

## Solution

Augment the error message of some `expect()` call with the entity ID and
generation. Combined with some external tool like `bevy-inspector-egui`, which
also displays the entity ID, this increases the chances to be able to identify
the entity, and therefore find the error that led to a use-after-despawn.
2021-10-10 23:04:05 +00:00
..
entity Improve bevy_ecs and bevy_app API docs where referenced by the new Bevy Book (#2365) 2021-09-17 18:00:29 +00:00
query Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
schedule Fix bevy_ecs::schedule::executor_parallel::system span management (#2905) 2021-10-06 19:00:35 +00:00
storage Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
system Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
world Add entity ID to expect() message (#2943) 2021-10-10 23:04:05 +00:00
archetype.rs Improve bevy_ecs and bevy_app API docs where referenced by the new Bevy Book (#2365) 2021-09-17 18:00:29 +00:00
bundle.rs Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
change_detection.rs Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
component.rs Fix typo (#2944) 2021-10-10 22:42:01 +00:00
event.rs Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
lib.rs Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
reflect.rs Improve bevy_ecs and bevy_app API docs where referenced by the new Bevy Book (#2365) 2021-09-17 18:00:29 +00:00