Skip to content

RelationshipInsertHookMode for remove and take #18300

Open
@Brezak

Description

@Brezak

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

While working on #18058, I realized I could further optimize the code if could stop relationship components from removing the relation ship target component when it's empty. Otherwise removing relationship components may lead to archetype moves which get undone when replace_related finishes

What solution would you like?

  • Rename RelationshipInsertHookMode to RelationShipHookMode
  • Add remove_with_relationship_insert_hook_mode and take_with_relationship_insert_hook_mode analogous to insert_with_relationship_insert_hook_mode but for single components.

What alternative(s) have you considered?

Just paying for the archetype moves. The performance hit probably isn't going to be too noticeable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-PerformanceA change motivated by improving speed, memory usage or compile timesS-Needs-BenchmarkingThis set of changes needs performance benchmarking to double-check that they help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions