AudioSource.SetCustomCurve(AudioSourceCurveType type, AnimationCurve curve)
Set the custom curve for the given AudioSourceCurveType.
Parameters:
Name | Type | Description |
---|---|---|
type | AudioSourceCurveType | The curve type that should be set. |
curve | AnimationCurve | The 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.