AssetCloner Class
Namespace: Stride.Core.AssetsAssembly: Stride.Core.Assets.dll
Allows to clone an asset or values stored in an asset.
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. |
Fields
InvariantObjectListProperty
public static PropertyKey<List<object>> InvariantObjectListProperty
Field Value
Type | Description |
---|---|
PropertyKey<System.Collections.Generic.List<System.Object>> |
Properties
ClonerSelector
public static SerializerSelector ClonerSelector { get; }
Property Value
Type | Description |
---|---|
SerializerSelector |
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. |