Struct UnsafeAppendBuffer | Collections | 0.5.2-preview.8
docs.unity3d.com
    Show / Hide Table of Contents

    Struct UnsafeAppendBuffer

    Namespace: Unity.Collections.LowLevel.Unsafe
    Syntax
    public struct UnsafeAppendBuffer : IDisposable

    Constructors

    UnsafeAppendBuffer(Int32, Int32, Allocator)

    Declaration
    public UnsafeAppendBuffer(int initialCapacity, int alignment, Allocator allocator)
    Parameters
    Type Name Description
    Int32 initialCapacity
    Int32 alignment
    Allocator allocator

    UnsafeAppendBuffer(Void*, Int32)

    Declaration
    public UnsafeAppendBuffer(void *externalBuffer, int capacity)
    Parameters
    Type Name Description
    Void* externalBuffer
    Int32 capacity

    Fields

    Alignment

    Declaration
    public readonly int Alignment
    Field Value
    Type Description
    Int32

    Allocator

    Declaration
    public readonly Allocator Allocator
    Field Value
    Type Description
    Allocator

    Capacity

    Declaration
    public int Capacity
    Field Value
    Type Description
    Int32

    Ptr

    Declaration
    public byte *Ptr
    Field Value
    Type Description
    Byte*

    Size

    Declaration
    public int Size
    Field Value
    Type Description
    Int32

    Properties

    IsEmpty

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Add(String)

    Declaration
    public void Add(string value)
    Parameters
    Type Name Description
    String value

    Add(Void*, Int32)

    Declaration
    public void Add(void *t, int structSize)
    Parameters
    Type Name Description
    Void* t
    Int32 structSize

    Add<T>(T)

    Declaration
    public void Add<T>(T t)
        where T : struct
    Parameters
    Type Name Description
    T t
    Type Parameters
    Name Description
    T

    Add<T>(NativeArray<T>)

    Declaration
    public void Add<T>(NativeArray<T> value)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> value
    Type Parameters
    Name Description
    T

    AddArray<T>(Void*, Int32)

    Declaration
    public void AddArray<T>(void *data, int count)
        where T : struct
    Parameters
    Type Name Description
    Void* data
    Int32 count
    Type Parameters
    Name Description
    T

    AsReader()

    Declaration
    public UnsafeAppendBuffer.Reader AsReader()
    Returns
    Type Description
    UnsafeAppendBuffer.Reader

    Dispose()

    Declaration
    public void Dispose()

    Pop(Void*, Int32)

    Declaration
    public void Pop(void *t, int structSize)
    Parameters
    Type Name Description
    Void* t
    Int32 structSize

    Pop<T>()

    Declaration
    public T Pop<T>()
        where T : struct
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Reset()

    Declaration
    public void Reset()

    ResizeUninitialized(Int32)

    Declaration
    public void ResizeUninitialized(int requestedSize)
    Parameters
    Type Name Description
    Int32 requestedSize

    SetCapacity(Int32)

    Declaration
    public void SetCapacity(int targetCapacity)
    Parameters
    Type Name Description
    Int32 targetCapacity

    ToBytes()

    Declaration
    public byte[] ToBytes()
    Returns
    Type Description
    Byte[]

    Extension Methods

    JobNativeMultiHashMapVisitKeyValue.Schedule<TJob, TKey, TValue>(TJob, NativeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobNativeMultiHashMapVisitKeyMutableValue.Schedule<TJob, TKey, TValue>(TJob, NativeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobUnsafeMultiHashMapVisitKeyValue.Schedule<TJob, TKey, TValue>(TJob, UnsafeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobUnsafeMultiHashMapVisitKeyMutableValue.Schedule<TJob, TKey, TValue>(TJob, UnsafeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023