pub fn component_clone_via_reflect(
source: &SourceComponent<'_>,
ctx: &mut ComponentCloneCtx<'_, '_>,
)Expand description
Component clone handler function implemented using reflect. Can be set as clone handler for any registered component, but only reflected components will be cloned.
To clone a component using this handler, the following must be true:
- World has
AppTypeRegistry - Component has
TypeId - Component is registered
- Component has
ReflectFromPtrregistered - Component can be cloned via
PartialReflect::reflect_cloneor has one of the following registered:ReflectFromReflect,ReflectDefault,ReflectFromWorld
If any of the conditions is not satisfied, the component will be skipped.
See EntityClonerBuilder for details.