SetBuffer
Set a buffer property.
읽는 시간 2분최근 업데이트: 한 달 전
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.