Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetBool

Use this method to set the value of a bool with the name you pass in.
Read time 1 minuteLast updated 6 days ago

Definition

SetBool(int, bool)

Use this method to set the value of a bool with the name you pass in.
public void SetBool(int nameID, bool b)

Parameters

nameID

The ID of the property. This is the same ID that Shader.PropertyToID returns.

The new bool value.

SetBool(string, bool)

Use this method to set the value of a bool with the name you pass in.
public void SetBool(string name, bool b)

Parameters

name

The name of the property.

The new bool value.