SetBuffer
Set a buffer property.
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
SetBuffer(string, ComputeBuffer)
Set a buffer property.
public void SetBuffer(string name, ComputeBuffer value)
Parameters
Remarks
Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.
Additional Resources: MaterialPropertyBlock.SetColor, MaterialPropertyBlock.SetVector, MaterialPropertyBlock.SetFloat, MaterialPropertyBlock.SetTexture.
SetBuffer(int, ComputeBuffer)
Set a buffer property.
public void SetBuffer(int nameID, ComputeBuffer value)
Parameters
The name ID of the property retrieved by Shader.PropertyToID.
The ComputeBuffer or GraphicsBuffer to set.
Remarks
Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.
Additional Resources: MaterialPropertyBlock.SetColor, MaterialPropertyBlock.SetVector, MaterialPropertyBlock.SetFloat, MaterialPropertyBlock.SetTexture.
SetBuffer(string, GraphicsBuffer)
Set a buffer property.
public void SetBuffer(string name, GraphicsBuffer value)
Parameters
Remarks
Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.
Additional Resources: MaterialPropertyBlock.SetColor, MaterialPropertyBlock.SetVector, MaterialPropertyBlock.SetFloat, MaterialPropertyBlock.SetTexture.
SetBuffer(int, GraphicsBuffer)
Set a buffer property.
public void SetBuffer(int nameID, GraphicsBuffer value)
Parameters
The name ID of the property retrieved by Shader.PropertyToID.
The ComputeBuffer or GraphicsBuffer to set.
Remarks
Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.