pub fn clone_relationship_target<T>(
source: &SourceComponent<'_>,
context: &mut ComponentCloneCtx<'_, '_>,
)where
T: RelationshipTarget,
Expand description
The “clone behavior” for RelationshipTarget
. This actually creates an empty
RelationshipTarget
instance with space reserved for the number of targets in the
original instance. The RelationshipTarget
will then be populated with the proper components
when the corresponding Relationship
sources of truth are inserted. Cloning the actual entities
in the original RelationshipTarget
would result in duplicates, so we don’t do that!
This will also queue up clones of the relationship sources if the EntityCloner
is configured
to spawn recursively.