# SetInt

> Sets the value of a int uniform.

## Definition

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

## SetInt(int, int)

Sets the value of a int uniform.

```csharp
public void SetInt(int nameID, int val)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The ID of the property as given by Shader.PropertyToID.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The int value to set.

### Remarks

Only shaders defined in the .raytrace file can access the value you designate as the argument for this method. To make this value accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the [Shader.SetGlobalInt](/engine/6000.7/script-reference/unityengine/shader/setglobalint.md) method instead.

## SetInt(string, int)

Sets the value of a int uniform.

```csharp
public void SetInt(string name, int val)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property being set.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The int value to set.

### Remarks

Only shaders defined in the .raytrace file can access the value you designate as the argument for this method. To make this value accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the [Shader.SetGlobalInt](/engine/6000.7/script-reference/unityengine/shader/setglobalint.md) method instead.
