Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetBool

Sets the value of a named bool property.
Read time 1 minuteLast updated 6 days ago

Definition

SetBool(int, bool)

Sets the value of a named bool property.
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 boolean value.

Remarks

Automatically changes overridden state for this property to true.

SetBool(string, bool)

Sets the value of a named bool property.
public void SetBool(string name, bool b)

Parameters

name

The name of the property.

The new boolean value.

Remarks

Automatically changes overridden state for this property to true.