# SetBool

> Sets the value of a boolean uniform.

## Definition

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

## SetBool(string, bool)

Sets the value of a boolean uniform.

```csharp
public void SetBool(string name, bool val)
```

### Parameters

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

### Remarks

The value specified as argument can be used only by the shaders defined inside the .raytrace file associated with the RayTracingShader.

## SetBool(int, bool)

Sets the value of a boolean uniform.

```csharp
public void SetBool(int nameID, bool val)
```

### Parameters

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

### Remarks

The value specified as argument can be used only by the shaders defined inside the .raytrace file associated with the RayTracingShader.
