Duplicates a model entity to create a new entity.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
A Boolean that you set to
trueto indicate that all descendant entities of the anchor should also be copied. Otherwise, no descendants are copied.
Model instance that is a duplicate of the original.
This method clones all component data automatically. When you clone an entity that stores custom data that’s not part of a component, override the
did method to copy that data manually after the clone finishes.