pub fn clone_with_opt_in(
target: Entity,
config: impl FnOnce(&mut EntityClonerBuilder<'_, OptIn>) + Send + Sync + 'static,
) -> impl EntityCommand
Expand description
An EntityCommand
that clones parts of an entity onto another entity,
configured through EntityClonerBuilder
.
This builder tries to clone every component that was explicitly allowed
from the source entity, for example by using the
allow
method.
Required components are also cloned when the target entity does not contain them.