# SetGlobalInteger

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

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## SetGlobalInteger(int, int)

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

```csharp
public void SetGlobalInteger(int nameID, int value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### 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](/engine/6000.7/script-reference/unityengine/shader/setglobalinteger.md).

For properties that use the legacy ShaderLab type `Int`, which are internally represented as floats, use [CommandBuffer.SetGlobalInt](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/setglobalint.md).

## SetGlobalInteger(string, int)

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

```csharp
public void SetGlobalInteger(string name, int value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### 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](/engine/6000.7/script-reference/unityengine/shader/setglobalinteger.md).

For properties that use the legacy ShaderLab type `Int`, which are internally represented as floats, use [CommandBuffer.SetGlobalInt](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/setglobalint.md).
