Version: 2021.3

CommandBuffer.SetGlobalInteger

切换到手册
public void SetGlobalInteger (int nameID, int value);
public void SetGlobalInteger (string name, int value);

描述

Adds a command to set the value of a given property for all Shaders, where the property is an integer.

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 SetGlobalInt.