# SetGlobalInt

> This method is deprecated. Use Shader.SetGlobalFloat or Shader.SetGlobalInteger instead.

## Definition

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

## SetGlobalInt(string, int)

This method is deprecated. Use [Shader.SetGlobalFloat](/engine/6000.5/script-reference/unityengine/shader/setglobalfloat.md) or [Shader.SetGlobalInteger](/engine/6000.5/script-reference/unityengine/shader/setglobalinteger.md) instead.

```csharp
public static void SetGlobalInt(string name, int value)
```

### Parameters

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

### Remarks

Internally float and integer shader properties are treated exactly the same, so this function is just an alias to [Shader.SetGlobalFloat](/engine/6000.5/script-reference/unityengine/shader/setglobalfloat.md).

## SetGlobalInt(int, int)

This method is deprecated. Use [Shader.SetGlobalFloat](/engine/6000.5/script-reference/unityengine/shader/setglobalfloat.md) or [Shader.SetGlobalInteger](/engine/6000.5/script-reference/unityengine/shader/setglobalinteger.md) instead.

```csharp
public static void SetGlobalInt(int nameID, int value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.5/script-reference/unityengine/shader/propertytoid.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Remarks

Internally float and integer shader properties are treated exactly the same, so this function is just an alias to [Shader.SetGlobalFloat](/engine/6000.5/script-reference/unityengine/shader/setglobalfloat.md).
