docs/bevy/release-content/migration-guides/component_ids.md 325 B · 9 lines · raw · history

1 ---
2 title: "Component ID constants are more type safe"
3 pull_requests: [25779]
4 ---
5
6 `ComponentId` constants like `ADD`, `INSERT`, `DISCARD`, `REMOVE`, `DESPAWN`,
7 and `IS_RESOURCE` are now `ComponentId` constants rather than `usize`, to
8 improve type safety. Use `ComponentId::index()` if you need the underlying `usize`
9 value.