Method CreateDisjointedPayloadBufferFromExistingPayloads
CreateDisjointedPayloadBufferFromExistingPayloads(ref FixedList512Bytes<PayloadHandle>)
Creates a new Disjointed buffer that's composed of preallocated Payloads, instead of allocating new ones.
Declaration
public PayloadHandle CreateDisjointedPayloadBufferFromExistingPayloads(ref FixedList512Bytes<PayloadHandle> payloadHandles)
Parameters
Type | Name | Description |
---|---|---|
FixedList512Bytes<PayloadHandle> | payloadHandles | Set a PayloadHandle values referencing Payload buffers that'll compose the new Disjointed buffer. |
Returns
Type | Description |
---|---|
PayloadHandle | If successful, a valid PayloadHandle to the DisjointedBuffer's head. |
Remarks
See AllocateDisjointedBuffer(ref FixedList64Bytes<ushort>, NativeList<PayloadHandle>) for a general overview on "Disjointed" payload buffers.
Use this method to group a set of Payload buffers that have already been allocated into a single Disjointed buffer. In this case, only the "head" payload needs to be allocated, which is then filled with the specified PayloadHandle value. A handle to the new head buffer is returned just as with AllocateDisjointedBuffer(ref FixedList64Bytes<ushort>, NativeList<PayloadHandle>).
Disjointed buffers created this way should be treated exactly the same as those allocated up front; the individual Payloads are now part of the whole buffer and should only be used for immediate reading/writing of data. Likewise, calling ReleasePayloadBuffer(PayloadHandle, out PayloadReleaseResult, bool) on the returned handle will now automatically release all the individual Payload buffers as well.
NOTE: The PayloadHandle values passed into this method must reference valid Payload buffers and cannot be themselves handles to Disjointed buffers. However, the handles are only validated when ENABLE_UNITY_COLLECTIONS_CHECKS or UNITY_DOTS_DEBUG are enabled.
CreateDisjointedPayloadBufferFromExistingPayloads(ref FixedList4096Bytes<PayloadHandle>)
Creates a new Disjointed buffer that's composed of preallocated Payloads, instead of allocating new ones.
Declaration
public PayloadHandle CreateDisjointedPayloadBufferFromExistingPayloads(ref FixedList4096Bytes<PayloadHandle> payloadHandles)
Parameters
Type | Name | Description |
---|---|---|
FixedList4096Bytes<PayloadHandle> | payloadHandles | Set a PayloadHandle values referencing Payload buffers that'll compose the new Disjointed buffer. |
Returns
Type | Description |
---|---|
PayloadHandle | If successful, a valid PayloadHandle to the DisjointedBuffer's head. |
Remarks
CreateDisjointedPayloadBufferFromExistingPayloads(ref NativeList<PayloadHandle>)
Creates a new Disjointed buffer that's composed of preallocated Payloads, instead of allocating new ones.
Declaration
public PayloadHandle CreateDisjointedPayloadBufferFromExistingPayloads(ref NativeList<PayloadHandle> payloadHandles)
Parameters
Type | Name | Description |
---|---|---|
NativeList<PayloadHandle> | payloadHandles | Set a PayloadHandle values referencing Payload buffers that'll compose the new Disjointed buffer. |
Returns
Type | Description |
---|---|
PayloadHandle | If successful, a valid PayloadHandle to the DisjointedBuffer's head. |