Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add last_changed_tick and added_tick to ComponentTicks #8803

Merged
merged 2 commits into from Jun 12, 2023

Conversation

nicopap
Copy link
Contributor

@nicopap nicopap commented Jun 10, 2023

Objective

EntityRef::get_change_ticks mentions that ComponentTicks is useful to create change detection for your own runtime.

However, ComponentTicks doesn't even expose enough data to create something that implements DetectChanges. Specifically, we need to be able to extract the last change tick.

Solution

We add a method to get the last change tick. We also add a method to get the added tick.

Changelog

  • Add last_changed_tick and added_tick to ComponentTicks

EntityRef::get_change_ticks mentions that ComponentTicks is useful to
create change detection for your own runtime.

However, ComponentTicks doesn't even expose enough data to create
something that implements DetectChanges. Specifically, we need to be
able to extract the last change tick.

We add a method to get the last change tick.
@nicopap nicopap added C-Enhancement A new feature A-ECS Entities, components, systems, and events labels Jun 10, 2023
@nicopap nicopap changed the title Add last_changed to ComponentTicks Add last_changed_tick and added_tick to ComponentTicks Jun 10, 2023
@james7132 james7132 added this pull request to the merge queue Jun 12, 2023
Merged via the queue into bevyengine:main with commit f07bb3c Jun 12, 2023
20 checks passed
@nicopap nicopap deleted the last_change_tick branch August 30, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Enhancement A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants