Provide public unsafe EntityRef::get_change_ticks_by_id
that takes ComponentId
#6682
Labels
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
What problem does this solve or what need does it fill?
I need to get the change ticks on the type-erased component for some entities. Basically EnitityRef::get_change_ticks but with
ComponentId
instead ofT
. I currently use the modified get_ticks function. My use-case is identifying all entities with changed components, and serializing these components, hence I cannot know the component type in advance.What solution would you like?
Solution is to define (unsafe?) public
get_chage_ticks_by_id()
that takesComponentId
instead of T. It should ideally be implemented for bothEntityRef
andEntityMut
for consistency.What alternative(s) have you considered?
There is already a get_ticks_with_type function that is pub(crate). One solution would be to make it public.
Another solution would be to make get_ticks public.
The text was updated successfully, but these errors were encountered: