Struct BinarySerializationContext<TValue>
The BinarySerializationContext<TValue> is available from adapters. It provides access to the current adapter enumerator and allows for control of serialization for a given type.
Inherited Members
Namespace: Unity.Behavior.Serialization.Binary
Assembly: Unity.Behavior.Serialization.dll
Syntax
public readonly struct BinarySerializationContext<TValue>
Type Parameters
| Name | Description |
|---|---|
| TValue | The value type being serialized. |
Properties
Writer
Gets the underlying Unity.Collections.LowLevel.Unsafe.UnsafeAppendBuffer which can be used to output data.
Declaration
public UnsafeAppendBuffer* Writer { get; }
Property Value
| Type | Description |
|---|---|
| UnsafeAppendBuffer* |
Methods
ContinueVisitation()
Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour.
Declaration
public void ContinueVisitation()
ContinueVisitationWithoutAdapters()
Continues visitation for the current type without running any more adapters. This will perform the default behaviour.
Declaration
public void ContinueVisitationWithoutAdapters()
SerializeValue<T>(T)
Writes the given value to the stream. This will run all adapters.
Declaration
public void SerializeValue<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value to write. |
Type Parameters
| Name | Description |
|---|---|
| T | The value type to write. |