init
TypeScriptstatic init(descriptor: LowLevelBuffer_Descriptor): LowLevelBufferSwift declarationinit(descriptor: LowLevelBuffer.Descriptor) throwsclass · iOS 26.0+ · SDK 27.1
final class LowLevelBufferstatic init(descriptor: LowLevelBuffer_Descriptor): LowLevelBufferSwift declarationinit(descriptor: LowLevelBuffer.Descriptor) throwsget descriptor(): LowLevelBuffer_DescriptorSwift declarationfinal let descriptor: LowLevelBuffer.DescriptorwithUnsafeBytes(callback: ((arg0: ArrayBuffer) => void)): voidSwift declarationfinal func withUnsafeBytes(_ callback: (UnsafeRawBufferPointer) -> Void)Read the buffer synchronously on the CPU. The buffer provided is only valid for the lifetime of the callback.
withUnsafeMutableBytes(callback: ((arg0: ArrayBuffer) => void)): voidSwift declarationfinal func withUnsafeMutableBytes(_ callback: (UnsafeMutableRawBufferPointer) -> Void)Update the buffer's contents synchronously on the CPU. The buffer provided is only valid for the lifetime of the callback.
replaceUnsafeMutableBytes(callback: ((arg0: ArrayBuffer) => void)): voidSwift declarationfinal func replaceUnsafeMutableBytes(_ callback: (UnsafeMutableRawBufferPointer) -> Void)Replace the buffer's contents synchronously on the CPU. The buffer's contents are unspecified, and it is the caller's responsibility to populate the buffer with valid data. The buffer provided is only valid for the lifetime of the callback.
read(commandBuffer: SDKHandle): SDKHandleSwift declarationfinal func read(using commandBuffer: any MTLCommandBuffer) -> any MTLBufferRetrieve the current contents of the buffer, for GPU reading.
replace(commandBuffer: SDKHandle): SDKHandleSwift declarationfinal func replace(using commandBuffer: any MTLCommandBuffer) -> any MTLBufferRetrieve an MTLBuffer that can be used to replace the contents of the buffer on GPU using Metal. The buffer's contents are in an uninitialized state. The caller supplies the MTLCommandBuffer that they intend to use for buffer modifications. RealityKit will wait for the MTLCommandBuffer to complete before utilizing the buffer for rendering.
get bytesUsed(): numberSwift declarationfinal var bytesUsed: Int { get set }set bytesUsed(value: number)Swift declarationfinal var bytesUsed: Int { get set }No declarations were skipped in this snapshot.