# GetInt

> This method is deprecated. Use Material.GetFloat or Material.GetInteger instead.

## Definition

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

## GetInt(string)

This method is deprecated. Use [Material.GetFloat](/engine/6000.7/script-reference/unityengine/material/getfloat.md) or [Material.GetInteger](/engine/6000.7/script-reference/unityengine/material/getinteger.md) instead.

```csharp
public int GetInt(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

This function is just an alias to [Material.GetFloat](/engine/6000.7/script-reference/unityengine/material/getfloat.md) that casts the resulting value to an integer.

## GetInt(int)

This method is deprecated. Use [Material.GetFloat](/engine/6000.7/script-reference/unityengine/material/getfloat.md) or [Material.GetInteger](/engine/6000.7/script-reference/unityengine/material/getinteger.md) instead.

```csharp
public int GetInt(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

This function is just an alias to [Material.GetFloat](/engine/6000.7/script-reference/unityengine/material/getfloat.md) that casts the resulting value to an integer.
