docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor DataStreamWriter

    DataStreamWriter(int, Allocator)

    Initializes a new instance of the DataStreamWriter struct.

    Declaration
    public DataStreamWriter(int length, Allocator allocator)
    Parameters
    Type Name Description
    int length

    The length of the buffer.

    Allocator allocator

    The Allocator used to allocate the memory.

    DataStreamWriter(NativeArray<byte>)

    Initializes a new instance of the DataStreamWriter struct with a NativeArray{byte}

    Declaration
    public DataStreamWriter(NativeArray<byte> data)
    Parameters
    Type Name Description
    NativeArray<byte> data

    The buffer we want to attach to our DataStreamWriter.

    DataStreamWriter(byte*, int)

    Initializes a new instance of the DataStreamWriter struct with a memory we don't own

    Declaration
    public DataStreamWriter(byte* data, int length)
    Parameters
    Type Name Description
    byte* data

    Pointer to the data

    int length

    Length of the data

    In This Article
    Back to top
    Copyright © 2023 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)