Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetGlobalInteger

Adds a command to set the value of a given property for all Shaders, where the property is an integer.
Read time 1 minuteLast updated 4 days ago

Definition

SetGlobalInteger(int, int)

Adds a command to set the value of a given property for all Shaders, where the property is an integer.
public void SetGlobalInteger(int nameID, int value)

Parameters

nameID


value

Remarks

When Unity executes the CommandBuffer, it sets the value of the given property for all Shaders. The effect is as the same as calling Shader.SetGlobalInteger.
For properties that use the legacy ShaderLab type
Int
, which are internally represented as floats, use CommandBuffer.SetGlobalInt.

SetGlobalInteger(string, int)

Adds a command to set the value of a given property for all Shaders, where the property is an integer.
public void SetGlobalInteger(string name, int value)

Parameters

name


value

Remarks

When Unity executes the CommandBuffer, it sets the value of the given property for all Shaders. The effect is as the same as calling Shader.SetGlobalInteger.
For properties that use the legacy ShaderLab type
Int
, which are internally represented as floats, use CommandBuffer.SetGlobalInt.