docs.unity.cn
    Show / Hide Table of Contents

    Struct BurstableMemoryBinaryReader

    Provides a reader compatible with the Burst compiler that can read primitive types from a binary buffer in memory.

    Namespace: Unity.Entities.Serialization
    Syntax
    [GenerateTestsForBurstCompatibility]
    public struct BurstableMemoryBinaryReader : BinaryReader, IDisposable

    Constructors

    Name Description
    BurstableMemoryBinaryReader(Byte*, Int64)

    Initializes and returns an instance of BurstableMemoryBinaryReader.

    Properties

    Name Description
    Position

    Gets or sets the current read position of the BurstableMemoryBinaryReader.

    Methods

    Name Description
    Dispose()

    Disposes the MemoryBinaryReader.

    ReadByte()

    Reads a byte and advances the current read position by a byte.

    ReadBytes(Void*, Int32)

    Reads the specified number of bytes and advances the current read position by that number of bytes.

    ReadInt()

    Reads an int and advances the current read position by the number of bytes in an int.

    ReadULong()

    Reads an ulong and advances the current read position by the number of bytes in an ulong.

    Extension Methods

    BlobAssetSerializeExtensions.Read<T>(BinaryReader)
    BinaryReaderExtensions.ReadByte(BinaryReader)
    BinaryReaderExtensions.ReadInt(BinaryReader)
    BinaryReaderExtensions.ReadULong(BinaryReader)
    BinaryReaderExtensions.ReadBytes(BinaryReader, NativeArray<Byte>, Int32, Int32)
    BinaryReaderExtensions.ReadArray<T>(BinaryReader, NativeArray<T>, Int32)

    See Also

    MemoryBinaryReader
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023