# SetInteger

> Sets a named integer value.

## Definition

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

## SetInteger(string, int)

Sets a named integer value.

```csharp
public void SetInteger(string name, int value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Property name, e.g. "\_SrcBlend".**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Integer value to set.

### Remarks

When setting values on materials using the Standard Shader, you should be aware that you may need to use [Material.EnableKeyword](/engine/6000.6/script-reference/unityengine/material/enablekeyword.md) to enable features of the shader that were not previously in use. For more detail, read [Accessing Materials via Script](/engine/6000.6/manual/materials-and-shaders/materials/accessing-via-script.md).

## SetInteger(int, int)

Sets a named integer value.

```csharp
public void SetInteger(int nameID, int value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Property name ID, use [Shader.PropertyToID](/engine/6000.6/script-reference/unityengine/shader/propertytoid.md) to get it.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Integer value to set.

### Remarks

When setting values on materials using the Standard Shader, you should be aware that you may need to use [Material.EnableKeyword](/engine/6000.6/script-reference/unityengine/material/enablekeyword.md) to enable features of the shader that were not previously in use. For more detail, read [Accessing Materials via Script](/engine/6000.6/manual/materials-and-shaders/materials/accessing-via-script.md).
