mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
9c004439b8
# Objective The `States::variants` method was once used to construct `OnExit` and `OnEnter` schedules for every possible value of a given `States` type. [Since the switch to lazily initialized schedules](https://github.com/bevyengine/bevy/pull/8028/files#diff-b2fba3a0c86e496085ce7f0e3f1de5960cb754c7d215ed0f087aa556e529f97f), we no longer need to track every possible value. This also opens the door to `States` types that aren't enums. ## Solution - Remove the unused `States::variants` method and its associated type. - Remove the enum-only restriction on derived States types. --- ## Changelog - Removed `States::variants` and its associated type. - Derived `States` can now be datatypes other than enums. ## Migration Guide - `States::variants` no longer exists. If you relied on this function, consider using a library that provides enum iterators. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |