![]() 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. |
||
---|---|---|
.. | ||
entity | ||
query | ||
schedule | ||
storage | ||
system | ||
world | ||
archetype.rs | ||
bundle.rs | ||
change_detection.rs | ||
component.rs | ||
event.rs | ||
lib.rs | ||
reflect.rs |