---
title: "didClone(from:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entity/didclone(from:)"
---

# didClone(from:)

Tells a newly cloned entity that cloning is complete.

## Declaration

```swift
@MainActor @preconcurrency func didClone(from source: Entity)
```

## Parameters

- `source`: The entity from which the cloned entity was copied.

## Discussion

Discussion 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 didClone(from:) method to copy that data manually after the clone finishes.

## See Also

### Creating an entity

- [init()](realitykit/entity/init().md)
- [init(components:)](realitykit/entity/init(components:)-1lmhe.md)
- [init(components:)](realitykit/entity/init(components:)-1lmhe.md)
- [clone(recursive:)](realitykit/entity/clone(recursive:).md)
