# SetCustomCurve(AudioSourceCurveType, AnimationCurve)

> Set the custom curve for the given AudioSourceCurveType.

## Definition

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

```csharp
public void SetCustomCurve(AudioSourceCurveType type, AnimationCurve curve)
```

### Parameters

**** (\[AudioSourceCurveType]\(/engine/6000.6/script-reference/unityengine/audiosourcecurvetype)): The curve type that should be set.**** (\[AnimationCurve]\(/engine/6000.6/script-reference/unityengine/animationcurve)): The curve that should be applied to the given curve type.

### Remarks

The curve will be scaled so that it is applied over [AudioSource.maxDistance](/engine/6000.6/script-reference/unityengine/audiosource/maxdistance.md) from the AudioSource.

Note that the internal AnimationCurve to be rescaled to range from 0..1 for performance reasons. This means calling [AudioSource.GetCustomCurve](/engine/6000.6/script-reference/unityengine/audiosource/getcustomcurve.md) will return a potentially different curve to what was just set.
