# SetInteger

> Adds a property to the block. If an integer property with the given name already exists, the old value is replaced.

## Definition

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

## SetInteger(string, int)

Adds a property to the block. If an integer property with the given name already exists, the old value is replaced.

```csharp
public void SetInteger(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)): The integer value to set.

## SetInteger(int, int)

Adds a property to the block. If an integer property with the given name already exists, the old value is replaced.

```csharp
public void SetInteger(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.7/script-reference/unityengine/shader/propertytoid.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The integer value to set.
