# HasGradient

> Checks if the Visual Effect can override a Gradient with the name you pass in.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.VFX](/engine/6000.5/script-reference/unityengine/vfx.md)
* **Assembly:** UnityEngine.VFXModule

## HasGradient(int)

Checks if the Visual Effect can override a Gradient with the name you pass in.

```csharp
public bool HasGradient(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The ID of the property. This is the same ID that [Shader.PropertyToID](/engine/6000.5/script-reference/unityengine/shader/propertytoid.md) returns.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

## HasGradient(string)

Checks if the Visual Effect can override a Gradient with the name you pass in.

```csharp
public bool HasGradient(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |
