docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct BinaryDeserializationContext<TValue>

    The BinaryDeserializationContext<TValue> is available from adapters. It provides access to the current adapter enumerator and allows for control of deserialization for a given type.

    Implements
    IBinaryDeserializationContext
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Behavior.Serialization.Binary
    Assembly: Unity.Behavior.Serialization.dll
    Syntax
    public readonly struct BinaryDeserializationContext<TValue> : IBinaryDeserializationContext
    Type Parameters
    Name Description
    TValue

    The value type being deserialized.

    Properties

    Reader

    The in-memory representation of the value being deserialized.

    Declaration
    public UnsafeAppendBuffer.Reader* Reader { get; }
    Property Value
    Type Description
    Reader*

    Methods

    ContinueVisitation()

    Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour and return the deserialized value.

    Declaration
    public TValue ContinueVisitation()
    Returns
    Type Description
    TValue

    The deserialized value.

    ContinueVisitation(ref TValue)

    Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour and return the deserialized value.

    Declaration
    public void ContinueVisitation(ref TValue value)
    Parameters
    Type Name Description
    TValue value

    The value being deserialized.

    ContinueVisitationWithoutAdapters()

    Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour and return the deserialized value.

    Declaration
    public TValue ContinueVisitationWithoutAdapters()
    Returns
    Type Description
    TValue

    The deserialized value.

    ContinueVisitationWithoutAdapters(ref TValue)

    Continues visitation for the current type. This will invoke the default behaviour and return the deserialized value.

    Declaration
    public void ContinueVisitationWithoutAdapters(ref TValue value)
    Parameters
    Type Name Description
    TValue value

    The value being deserialized.

    DeserializeValue<T>()

    Reads the next value in the stream as T and returns it. This will run all adapters.

    Declaration
    public T DeserializeValue<T>()
    Returns
    Type Description
    T

    The instance of type T deserialized.

    Type Parameters
    Name Description
    T

    The type of the value being deserialized.

    Implements

    IBinaryDeserializationContext
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)