Entity.CopyTo(World,ComponentCloner).md
March 19, 2022 ยท View on GitHub
DefaultEcs
DefaultEcs.Entity
Entity.CopyTo(World, ComponentCloner) Method
Creates a copy of current Entity with all of its components in the given World using the given ComponentCloner.
This method is not thread safe.
public DefaultEcs.Entity CopyTo(DefaultEcs.World world, DefaultEcs.ComponentCloner cloner);
Parameters
world World
The World instance to which copy current Entity and its components.
cloner ComponentCloner
The ComponentCloner to use to copy the components.
Returns
Entity
The created Entity in the given World.
Exceptions
System.ArgumentNullException
world or cloner was null.
System.InvalidOperationException
Entity was not created from a World.