GraphicsBufferHandle
Stores the internal handle of a GraphicsBuffer using a plain integer value.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Struct
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
- Implements: IEquatable<GraphicsBufferHandle>
public readonly struct GraphicsBufferHandle : IEquatable<GraphicsBufferHandle>
Remarks
The purpose of is to represent a GraphicsBuffer using a struct which can be stored in unmanaged memory. This is necessary to interact with certain Unity APIs that may involve , Burst compatible code, and/or unmanaged memory such as NativeArray. For example, some parts of the BatchRendererGroup API use to be able to set buffers from Burst compatible code.
GraphicsBufferHandleunsafeGraphicsBufferHandleAny instances with the same are completely equivalent to one another. A can be manually constructed with any value that originates from a valid . For example, you could store the into a , and later construct a new with the same integer read from the array, and it would be equivalent to the original .
GraphicsBufferHandlevalueGraphicsBufferHandleuintGraphicsBufferHandle.valuevalueNativeArray<uint>GraphicsBufferHandleGraphicsBufferHandleA is valid as long as the GraphicsBuffer it has been fetched from has not been disposed.
GraphicsBufferHandleFields
Value | Description |
|---|---|
| value | The integer value of this |