文档

Unity Engine

Unity Engine

SetInt

Set an integer parameter.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

SetInt(int, int)

Set an integer parameter.
public void SetInt(int nameID, int val)

Parameters

nameID

Property name ID, use Shader.PropertyToID to get it.

val

Value to set.

Remarks

Constant buffers are shared between all kernels in a single compute shader asset. Therefore this function affects all kernels in this ComputeShader.

SetInt(string, int)

Set an integer parameter.
public void SetInt(string name, int val)

Parameters

name

Variable name in shader code.

val

Value to set.

Remarks

Constant buffers are shared between all kernels in a single compute shader asset. Therefore this function affects all kernels in this ComputeShader.