Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    AssetCloner Class

    Namespace: Stride.Core.Assets
    Assembly: Stride.Core.Assets.dll

    Allows to clone an asset or values stored in an asset.

    System.Object → AssetCloner
    Derived from AssetCloner:

    public class AssetCloner
    Name Description
    Fields
    InvariantObjectListProperty
    Properties
    ClonerSelector
    Methods
    Clone(Object, AssetClonerFlags)

    Clones the specified asset using asset serialization.

    Clone(Object, AssetClonerFlags, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    Clone(Object, AssetClonerFlags, HashSet<IIdentifiable>, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    Clone<T>(T, AssetClonerFlags)

    Clones the specified asset using asset serialization.

    Clone<T>(T, AssetClonerFlags, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    Clone<T>(T, AssetClonerFlags, HashSet<IIdentifiable>, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    | Improve this Doc View Source

    Fields


    InvariantObjectListProperty

    public static PropertyKey<List<object>> InvariantObjectListProperty
    Field Value
    Type Description
    PropertyKey<System.Collections.Generic.List<System.Object>>
    | Improve this Doc View Source

    Properties


    ClonerSelector

    public static SerializerSelector ClonerSelector { get; }
    Property Value
    Type Description
    SerializerSelector
    | Improve this Doc View Source

    Methods


    Clone(Object, AssetClonerFlags)

    Clones the specified asset using asset serialization.

    public static object Clone(object asset, AssetClonerFlags flags = AssetClonerFlags.None)
    Parameters
    Type Name Description
    System.Object asset

    The asset.

    AssetClonerFlags flags

    Flags used to control the cloning process

    Returns
    Type Description
    System.Object

    A clone of the asset.


    Clone(Object, AssetClonerFlags, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    public static object Clone(object asset, AssetClonerFlags flags, out Dictionary<Guid, Guid> idRemapping)
    Parameters
    Type Name Description
    System.Object asset

    The asset.

    AssetClonerFlags flags

    Flags used to control the cloning process

    System.Collections.Generic.Dictionary<System.Guid, System.Guid> idRemapping

    A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.

    Returns
    Type Description
    System.Object

    A clone of the asset.


    Clone(Object, AssetClonerFlags, HashSet<IIdentifiable>, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    public static object Clone(object asset, AssetClonerFlags flags, HashSet<IIdentifiable> externalIdentifiable, out Dictionary<Guid, Guid> idRemapping)
    Parameters
    Type Name Description
    System.Object asset

    The asset.

    AssetClonerFlags flags

    Flags used to control the cloning process

    System.Collections.Generic.HashSet<IIdentifiable> externalIdentifiable
    System.Collections.Generic.Dictionary<System.Guid, System.Guid> idRemapping

    A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.

    Returns
    Type Description
    System.Object

    A clone of the asset.


    Clone<T>(T, AssetClonerFlags)

    Clones the specified asset using asset serialization.

    public static T Clone<T>(T asset, AssetClonerFlags flags = AssetClonerFlags.None)
    Parameters
    Type Name Description
    T asset

    The asset.

    AssetClonerFlags flags

    Flags used to control the cloning process

    Returns
    Type Description
    T

    A clone of the asset.

    Type Parameters
    Name Description
    T

    The type of the asset.


    Clone<T>(T, AssetClonerFlags, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    public static T Clone<T>(T asset, AssetClonerFlags flags, out Dictionary<Guid, Guid> idRemapping)
    Parameters
    Type Name Description
    T asset

    The asset.

    AssetClonerFlags flags

    Flags used to control the cloning process

    System.Collections.Generic.Dictionary<System.Guid, System.Guid> idRemapping

    A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.

    Returns
    Type Description
    T

    A clone of the asset.

    Type Parameters
    Name Description
    T

    The type of the asset.


    Clone<T>(T, AssetClonerFlags, HashSet<IIdentifiable>, out Dictionary<Guid, Guid>)

    Clones the specified asset using asset serialization.

    public static T Clone<T>(T asset, AssetClonerFlags flags, HashSet<IIdentifiable> externalIdentifiable, out Dictionary<Guid, Guid> idRemapping)
    Parameters
    Type Name Description
    T asset

    The asset.

    AssetClonerFlags flags

    Flags used to control the cloning process

    System.Collections.Generic.HashSet<IIdentifiable> externalIdentifiable
    System.Collections.Generic.Dictionary<System.Guid, System.Guid> idRemapping

    A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.

    Returns
    Type Description
    T

    A clone of the asset.

    Type Parameters
    Name Description
    T

    The type of the asset.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation