Skip to main content

AudioSource.SetCustomCurve(AudioSourceCurveType type, AnimationCurve curve)

Set the custom curve for the given AudioSourceCurveType.

Parameters:

NameTypeDescription
typeAudioSourceCurveTypeThe curve type that should be set.
curveAnimationCurveThe curve that should be applied to the given curve type.

Usage

---@type AudioSource
local audiosource;

---@type AudioSourceCurveType
local type;

---@type AnimationCurve
local curve;


audiosource.SetCustomCurve(type, curve)

Extra Detail

The curve will be scaled so that it is applied over AudioSource.maxDistance from the AudioSource.