Skip to content

Deprecate and remove insert_or_spawn_batch #15704

Closed
@alice-i-cecile

Description

@alice-i-cecile

Just like in #15459 / #15652 for get_or_spawn, insert_or_spawn_batch is an anti-pattern: it uses entity IDs in a non-opaque way, attempting to assign specific meaning to certain entities. With the retained rendering world in place, we should remove it to discourage this pattern and enforce the ECS invariants more strongly.

#15702 should be merged first, to ensure that the migration path for the non-footgunny part of this API is smooth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesM-Needs-Migration-GuideA breaking change to Bevy's public API that needs to be noted in a migration guideS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions