ComputeBufferManager
public class ComputeBufferManagerComputeBuffer management for GPU data upload. Buffer lifecycle, resizing, and data updates.
Constructors
Section titled “Constructors”
ComputeBufferManager()
Section titled “ComputeBufferManager()”public ComputeBufferManager()No description is available for this member.
Properties
Section titled “Properties”
SupportsCompute
Section titled “SupportsCompute”public bool SupportsCompute { get; }No description is available for this member.
Returns
System.Boolean — No return description is available.
Methods
Section titled “Methods”
GetBuffer(string, int, int)
Section titled “GetBuffer(string, int, int)”public ComputeBuffer GetBuffer(string name, int count, int stride)Get or create a buffer with the specified name and size.
Parameters
| Name | Type | Description |
|---|---|---|
name |
System.String | Unique buffer name. |
count |
System.Int32 | Number of elements. |
stride |
System.Int32 | Size of each element in bytes. |
Returns
UnityEngine.ComputeBuffer — No return description is available.
SetData(string, T[])
Section titled “SetData(string, T[])”public void SetData<T>(string name, T[] data) where T : structUpdate buffer data from managed array.
Parameters
| Name | Type | Description |
|---|---|---|
name |
System.String | |
data |
{T}[] | |
SetData(string, NativeArray)
Section titled “SetData(string, NativeArray)”public void SetData<T>(string name, NativeArray<T> data) where T : structUpdate buffer data from NativeArray.
Parameters
| Name | Type | Description |
|---|---|---|
name |
System.String | |
data |
Unity.Collections.NativeArray{{T}} | |
BindToMaterial(string, Material, string)
Section titled “BindToMaterial(string, Material, string)”public void BindToMaterial(string bufferName, Material material, string shaderProperty)Bind buffer to material.
Parameters
| Name | Type | Description |
|---|---|---|
bufferName |
System.String | |
material |
UnityEngine.Material | |
shaderProperty |
System.String | |
ReleaseBuffer(string)
Section titled “ReleaseBuffer(string)”public void ReleaseBuffer(string name)Release a specific buffer.
Parameters
| Name | Type | Description |
|---|---|---|
name |
System.String | |
ReleaseAll()
Section titled “ReleaseAll()”public void ReleaseAll()Release all buffers.
GetBarBuffer(int)
Section titled “GetBarBuffer(int)”public ComputeBuffer GetBarBuffer(int count)Create buffer for bar chart instances.
Parameters
| Name | Type | Description |
|---|---|---|
count |
System.Int32 |
Returns
UnityEngine.ComputeBuffer — No return description is available.
GetLineBuffer(int)
Section titled “GetLineBuffer(int)”public ComputeBuffer GetLineBuffer(int count)Create buffer for line chart points.
Parameters
| Name | Type | Description |
|---|---|---|
count |
System.Int32 |
Returns
UnityEngine.ComputeBuffer — No return description is available.
GetPointBuffer(int)
Section titled “GetPointBuffer(int)”public ComputeBuffer GetPointBuffer(int count)Create buffer for point/scatter data.
Parameters
| Name | Type | Description |
|---|---|---|
count |
System.Int32 |
Returns
UnityEngine.ComputeBuffer — No return description is available.
GetSectorBuffer(int)
Section titled “GetSectorBuffer(int)”public ComputeBuffer GetSectorBuffer(int count)Create buffer for pie/donut sectors.
Parameters
| Name | Type | Description |
|---|---|---|
count |
System.Int32 |
Returns
UnityEngine.ComputeBuffer — No return description is available.
Dispose()
Section titled “Dispose()”public void Dispose()No description is available for this member.