C# Class Xenko.Engine.Design.EntityCloner

Mostra file Open project: xen2/stride

Public Properties

Property Type Description
CloneContextProperty PropertyKey

Public Methods

Method Description
Clone ( Entity entity ) : Entity

Clones the specified entity. Entity, children Entity and their EntityComponent will be cloned. Other assets will be shared.

Clone ( Prefab prefab ) : Prefab

Clones the specified prefab. Entity, children Entity and their EntityComponent will be cloned. Other assets will be shared.

Private Methods

Method Description
Clone ( HashSet clonedObjects, TryGetValueFunction mappedObjects, entity ) : T

Clones the specified object, taking special care of Entity, EntityComponent and external assets. User can optionally provides list of cloned objects (list of data reference objects that should be cloned) and mapped objects (list of data reference objects that should be ducplicated using the given instance).

ClonedObjects ( ) : HashSet
CollectEntityTreeHelper ( Entity entity, HashSet entityAndComponents ) : void

Collect entities and components recursively from an entity and add them to a hashset.

Method Details

Clone() public static method

Clones the specified entity. Entity, children Entity and their EntityComponent will be cloned. Other assets will be shared.
public static Clone ( Entity entity ) : Entity
entity Entity The entity.
return Entity

Clone() public static method

Clones the specified prefab. Entity, children Entity and their EntityComponent will be cloned. Other assets will be shared.
public static Clone ( Prefab prefab ) : Prefab
prefab Prefab The prefab to clone.
return Prefab

Property Details

CloneContextProperty public_oe static_oe property

public static PropertyKey CloneContextProperty
return PropertyKey