# SetAlphaKeys(ReadOnlySpan<GradientAlphaKey>)

> Setup gradient with an array of alpha keys.

## Definition

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

```csharp
public void SetAlphaKeys(ReadOnlySpan<GradientAlphaKey> keys)
```

### Parameters

**** (\[ReadOnlySpan\<GradientAlphaKey>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): Array of alpha keys.

### Remarks

Note that the alpha keys will be automatically sorted by time value and that it is ensured to always have a minimum of 2 alpha keys.
