Struct BinarySerializationParameters
Custom parameters to use for binary serialization or deserialization.
Inherited Members
Namespace: Unity.Serialization.Binary
Assembly: Unity.Serialization.dll
Syntax
public struct BinarySerializationParameters
Properties
DisableRootAdapters
By default, adapters are evaluated for root objects. Use this to change the default behaviour.
Declaration
public bool DisableRootAdapters { readonly get; set; }
Property Value
Type | Description |
---|---|
bool |
DisableSerializedReferences
By default, references between objects are serialized. Use this to always write a copy of the object to the output.
Declaration
public bool DisableSerializedReferences { readonly get; set; }
Property Value
Type | Description |
---|---|
bool |
RequiresThreadSafety
This parameter indicates if the serializer should be thread safe. The default value is false.
Declaration
public bool RequiresThreadSafety { readonly get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Setting this to true will cause managed allocations for the internal visitor.
SerializedType
By default, a polymorphic root type will have it's assembly qualified type name written to the stream. Use this parameter to provide a known root type at both serialize and deserialize time to avoid writing this information.
Declaration
public Type SerializedType { readonly get; set; }
Property Value
Type | Description |
---|---|
Type |
State
Sets the state object for serialization. This can be used to share resources across multiple calls to serialize and deserialize.
Declaration
public BinarySerializationState State { readonly get; set; }
Property Value
Type | Description |
---|---|
Binary |
UserDefinedAdapters
Provide a custom set of adapters for the serialization and deserialization.
Declaration
public List<IBinaryAdapter> UserDefinedAdapters { readonly get; set; }
Property Value
Type | Description |
---|---|
List<IBinary |
Remarks
These adapters will be evaluated first before any global or built in adapters.