# GetGlobalInt

> This method is deprecated. Use Shader.GetGlobalFloat or Shader.GetGlobalInteger instead.

## Definition

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

## GetGlobalInt(string)

This method is deprecated. Use [Shader.GetGlobalFloat](/engine/6000.7/script-reference/unityengine/shader/getglobalfloat.md) or [Shader.GetGlobalInteger](/engine/6000.7/script-reference/unityengine/shader/getglobalinteger.md) instead.

```csharp
public static int GetGlobalInt(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) |             |

### Remarks

Calling this method is equivalent to calling [Shader.GetGlobalFloat](/engine/6000.7/script-reference/unityengine/shader/getglobalfloat.md) and casting the returned value to integer. Additional Resources: [Shader.GetGlobalFloat](/engine/6000.7/script-reference/unityengine/shader/getglobalfloat.md), [Shader.GetGlobalInteger](/engine/6000.7/script-reference/unityengine/shader/getglobalinteger.md).

## GetGlobalInt(int)

This method is deprecated. Use [Shader.GetGlobalFloat](/engine/6000.7/script-reference/unityengine/shader/getglobalfloat.md) or [Shader.GetGlobalInteger](/engine/6000.7/script-reference/unityengine/shader/getglobalinteger.md) instead.

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

### Parameters

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

### Returns

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

### Remarks

Calling this method is equivalent to calling [Shader.GetGlobalFloat](/engine/6000.7/script-reference/unityengine/shader/getglobalfloat.md) and casting the returned value to integer. Additional Resources: [Shader.GetGlobalFloat](/engine/6000.7/script-reference/unityengine/shader/getglobalfloat.md), [Shader.GetGlobalInteger](/engine/6000.7/script-reference/unityengine/shader/getglobalinteger.md).
