Table of Contents

Class EntityCloner

Namespace
Stride.Engine.Design
Assembly
Stride.Engine.dll

Provides method for deep cloning of en Entity.

[DataSerializerGlobal(typeof(CloneSerializer<Effect>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<SpriteSheet>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<SamplerState>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<Texture>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<Mesh>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<Model>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<AnimationClip>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<Sound>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<string>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<OfflineRasterizedSpriteFont>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<RuntimeRasterizedSpriteFont>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<SignedDistanceFieldSpriteFont>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<Prefab>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
[DataSerializerGlobal(typeof(CloneSerializer<Entity>), null, DataSerializerGenericMode.None, false, false, Profile = "Clone")]
public class EntityCloner
Inheritance
object
EntityCloner

Fields

CloneContextProperty

public static readonly PropertyKey<EntityCloner.CloneContext> CloneContextProperty

Field Value

PropertyKey<EntityCloner.CloneContext>

Methods

Clone(Entity)

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

public static Entity Clone(Entity entity)

Parameters

entity Entity

The entity.

Returns

Entity

A cloned entity

Instantiate(Prefab)

Instantiates the content of the prefab provided. Entities, children Entity and their EntityComponent will be cloned. Other assets will be shared.

public static List<Entity> Instantiate(Prefab prefab)

Parameters

prefab Prefab

The prefab to instantiate.

Returns

List<Entity>

A clone of this prefab's Entities