Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetBool

Set a bool parameter.
Read time 1 minuteLast updated 4 days ago

Definition

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

SetBool(string, bool)

Set a bool parameter.
public void SetBool(string name, bool 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.

SetBool(int, bool)

Set a bool parameter.
public void SetBool(int nameID, bool 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.