Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information