Class InvariantObjectCloneSerializer<T>
- Namespace
- Stride.Core.Assets.Serializers
- Assembly
- Stride.Core.Assets.dll
A fake serializer used for cloning invariant objects. Instead of actually cloning the invariant object, this serializer store it in a list of the context and restore when deserializing.
[DataSerializerGlobal(typeof(InvariantObjectCloneSerializer<string>), null, DataSerializerGenericMode.None, false, false, Profile = "AssetClone")]
public class InvariantObjectCloneSerializer<T> : DataSerializer<T>
Type Parameters
T
- Inheritance
-
InvariantObjectCloneSerializer<T>
- Inherited Members
Methods
Serialize(ref T, ArchiveMode, SerializationStream)
Serializes or deserializes the given object obj
.
public override void Serialize(ref T obj, ArchiveMode mode, SerializationStream stream)
Parameters
obj
TThe object to serialize or deserialize.
mode
ArchiveModeThe serialization mode.
stream
SerializationStreamThe stream to serialize or deserialize to.