Class AssetCloner
Allows to clone an asset or values stored in an asset.
public class AssetCloner
  - Inheritance
 - 
      objectAssetCloner
 
Fields
InvariantObjectListProperty
public static PropertyKey<List<object>> InvariantObjectListProperty
  Field Value
- PropertyKey<List<object>>
 
Properties
ClonerSelector
public static SerializerSelector ClonerSelector { get; }
  Property Value
Methods
Clone(object?, AssetClonerFlags)
Clones the specified asset using asset serialization.
public static object? Clone(object? asset, AssetClonerFlags flags = AssetClonerFlags.None)
  Parameters
assetobjectThe asset.
flagsAssetClonerFlagsFlags used to control the cloning process
Returns
- 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
assetobjectThe asset.
flagsAssetClonerFlagsFlags used to control the cloning process
idRemappingDictionary<Guid, Guid>A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.
Returns
- 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
assetobjectThe asset.
flagsAssetClonerFlagsFlags used to control the cloning process
externalIdentifiableHashSet<IIdentifiable>idRemappingDictionary<Guid, Guid>A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.
Returns
- 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
assetTThe asset.
flagsAssetClonerFlagsFlags used to control the cloning process
Returns
- T
 A clone of the asset.
Type Parameters
TThe 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
assetTThe asset.
flagsAssetClonerFlagsFlags used to control the cloning process
idRemappingDictionary<Guid, Guid>A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.
Returns
- T
 A clone of the asset.
Type Parameters
TThe 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
assetTThe asset.
flagsAssetClonerFlagsFlags used to control the cloning process
externalIdentifiableHashSet<IIdentifiable>idRemappingDictionary<Guid, Guid>A dictionary containing the remapping of Id if GenerateNewIdsForIdentifiableObjects has been passed to the cloner.
Returns
- T
 A clone of the asset.
Type Parameters
TThe type of the asset.