Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnsafeAppendBuffer

struct in Unity.Collections.LowLevel.Unsafe


Implements interfaces:INativeDisposable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

An unmanaged, untyped, heterogeneous buffer.

The values written to an individual append buffer can be of different types.

Properties

Property Description
Alignment The byte alignment used when allocating the internal buffer.
Allocator The allocator used to create the internal buffer.
Capacity The size in bytes of the internal buffer.
IsCreated Whether this append buffer has been allocated (and not yet deallocated).
IsEmpty Whether the append buffer is empty.
Length The size in bytes of the currently-used portion of the internal buffer.
Ptr The internal buffer where the content is stored.

Constructors

Constructor Description
UnsafeAppendBuffer Initializes and returns an instance of UnsafeAppendBuffer.

Public Methods

Method Description
Add Appends an element to the end of this append buffer.
AddArray Appends the elements of a buffer to the end of this append buffer.
AsReader Returns a reader for this append buffer.
Dispose Releases all resources (memory and safety handles).
Pop Removes and returns the last element of this append buffer.
Reset Sets the length to 0.
ResizeUninitialized Sets the length in bytes.
SetCapacity Sets the size in bytes of the internal buffer.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961