-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Cloning into and clone and spawn methods don't cover the same areas #23498
Copy link
Copy link
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed uponThis work is generally agreed upon
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed uponThis work is generally agreed upon
Type
Projects
Status
Needs SME Triage
What problem does this solve or what need does it fill?
Currently when trying to clone components into an existing entity the methods available are
However when trying to clone components into a new entity the methods available are
Cloning components into an already existing is missing an equivalent to
clone_and_spawn, and spawning a new entity and cloning components into it is missing an equivalent toclone_components.What solution would you like?
Change
clone_componentsto clone all components and add aclone_bundlethat only clones the components in the bundle.Add a
clone_bundle_and_spawnmethod for spawning an entity with the cloned components in the bundle.What alternative(s) have you considered?
Use the already existing
clone_(and_spawn)_with_opt_*methods to cover the missing space, however these methods are quite low level and may be confusing for newcomers