Struct PackedBinaryStream | Serialization | 1.2.0-preview
docs.unity.cn
    Show / Hide Table of Contents

    Struct PackedBinaryStream

    Output stream for deserialization. This stream is used to retain relevant data parsed during deserialization.

    Namespace: Unity.Serialization.Json
    Syntax
    public struct PackedBinaryStream : IDisposable
    Remarks

    The contents of the stream are not actualized and instead remain as a string of characters.

    Constructors

    PackedBinaryStream(Allocator)

    Constructs a new instance of PackedBinaryStream using default capacities.

    Declaration
    public PackedBinaryStream(Allocator label)
    Parameters
    Type Name Description
    Allocator label

    The memory allocator label to use.

    PackedBinaryStream(Int32, Int32, Allocator)

    Constructs a new instance of PackedBinaryStream using the given capacities.

    Declaration
    public PackedBinaryStream(int initialTokensCapacity, int initialBufferCapacity, Allocator label)
    Parameters
    Type Name Description
    Int32 initialTokensCapacity

    Initial number of tokens to allocate.

    Int32 initialBufferCapacity

    Initial buffer size to allocate.

    Allocator label

    Allocator to use for internal buffers.

    Methods

    Clear()

    Clears all token and buffer data.

    Declaration
    public void Clear()

    Dispose()

    Releases all resources used by the PackedBinaryStream.

    Declaration
    public void Dispose()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX