# GetGlobalInteger

> Gets a global integer property for all shaders previously set using Shader.SetGlobalInteger.

## Definition

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

## GetGlobalInteger(string)

Gets a global integer property for all shaders previously set using [Shader.SetGlobalInteger](/engine/6000.0/script-reference/unityengine/shader/setglobalinteger.md).

```csharp
public static int GetGlobalInteger(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

## GetGlobalInteger(int)

Gets a global integer property for all shaders previously set using [Shader.SetGlobalInteger](/engine/6000.0/script-reference/unityengine/shader/setglobalinteger.md).

```csharp
public static int GetGlobalInteger(int nameID)
```

### Parameters

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

### Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |
