Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

name

The name of the property.

Remarks

Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.

SetBuffer(int, ComputeBuffer)

Set a buffer property.
public void SetBuffer(int nameID, ComputeBuffer value)

Parameters

nameID

The name ID of the property retrieved by Shader.PropertyToID.

Remarks

Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.

SetBuffer(string, GraphicsBuffer)

Set a buffer property.
public void SetBuffer(string name, GraphicsBuffer value)

Parameters

name

The name of the property.

Remarks

Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.

SetBuffer(int, GraphicsBuffer)

Set a buffer property.
public void SetBuffer(int nameID, GraphicsBuffer value)

Parameters

nameID

The name ID of the property retrieved by Shader.PropertyToID.

Remarks

Adds a property to the block. If a buffer property with the given name already exists, the old value is replaced.