didClone(from:)
Tells a newly cloned entity that cloning is complete.
Declaration
@MainActor @preconcurrency func didClone(from source: Entity)Parameters
- source:
The entity from which the cloned entity was copied.
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.