Skip to content

Add an API to manually set change ticks for advanced users #5633

Closed
@alice-i-cecile

Description

@alice-i-cecile

What problem does this solve or what need does it fill?

This API is essential to ensure the reliability of change detection with rollback networking.

[6:42 AM] Joy: and another thing is I haven't fully figured out how to not break change detection with the whole rollback thing
[6:42 AM] Joy: simulation component and system change ticks need to be reset like everything else that gets rolled back, so I need us to add a method that lets users manually set change ticks

From @maniwani.

What solution would you like?

Add a set_last_changed method to DetectChanges. This should come with warnings in the docs about the need to carefully think through exactly what you're doing.

What alternative(s) have you considered?

Never use change detection in games with rollback networking?

Use a different networking strategy?

Additional context

If we're adding this, we should similarly add a change-detection bypass to avoid users cobbling together an approach to do this by manually setting the change ticks.

This was previously done in #2363, but IMO should be unconditionally enabled instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions