bevy
bevy copied to clipboard
Move `EntityHash` related types into `bevy_ecs`
Objective
Reduce the size of bevy_utils (https://github.com/bevyengine/bevy/issues/11478)
Solution
Move EntityHash related types into bevy_ecs. This also allows us access to Entity, which means we no longer need EntityHashMap's first generic argument.
Changelog
- Moved
bevy::utils::{EntityHash, EntityHasher, EntityHashMap, EntityHashSet}intobevy::ecs::entity::hash. - Removed
EntityHashMap's first generic argument. It is now hardcoded to always beEntity.
Migration Guide
- Uses of
bevy::utils::{EntityHash, EntityHasher, EntityHashMap, EntityHashSet}now have to be imported frombevy::ecs::entity::hash. - Uses of
EntityHashMapno longer have to specify the first generic parameter. It is now hardcoded to always beEntity.
The migration guide could be changed to mention what needs to be adapter for the new changes, rather than the new changes themself. For example:
Migration guide
- Uses of
bevy::utils::{EntityHash, EntityHasher, EntityHashMap, EntityHashSet}now have to import them frombevy::ecs::entity::hash.- Uses of
EntityHashMapno longer have to specify its first generic parameter. It is now hardcoded to always be Entity.
CI failure is real: looks like you forgot to feature flag imports.
It doesn't look like my problem. If it is, what am I doing wrong?