# SetGlobalInt

> Adds a command to set the value of a given property for all Shaders, where the property has a type of Int in ShaderLab code.

## Definition

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

## SetGlobalInt(int, int)

Adds a command to set the value of a given property for all Shaders, where the property has a type of `Int` in ShaderLab code.

```csharp
public void SetGlobalInt(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. Internally, the shader property types `Float` and `Int` are treated exactly the same; therefore, this function is an alias to [CommandBuffer.SetGlobalFloat](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobalfloat.md).

For properties that use the ShaderLab type `Integer`, which are internally represented as integers, use [CommandBuffer.SetGlobalInteger](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobalinteger.md).

## SetGlobalInt(string, int)

Adds a command to set the value of a given property for all Shaders, where the property has a type of `Int` in ShaderLab code.

```csharp
public void SetGlobalInt(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. Internally, the shader property types `Float` and `Int` are treated exactly the same; therefore, this function is an alias to [CommandBuffer.SetGlobalFloat](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobalfloat.md).

For properties that use the ShaderLab type `Integer`, which are internally represented as integers, use [CommandBuffer.SetGlobalInteger](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobalinteger.md).
