AudioMotionExtensions
Bind a float to AudioSource volume or pitch or to an exposed AudioMixer parameter.
public static class AudioMotionExtensionsRequires com.unity.modules.audio
Members
BindToVolume
Schedule a tween that writes the interpolated value to Volume on the bound target and return its MotionHandle.
public static MotionHandle BindToVolume(this FloatMotionBuilder builder, AudioSource audioSource)Parameters and return value
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.audioSourceAudioSourceTarget AudioSource that receives the update.- Returns
MotionHandle
public static MotionHandle BindToVolume<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, AudioSource audioSource)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>Parameters and return value
builderthis MotionBuilder<float, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.audioSourceAudioSourceTarget AudioSource that receives the update.- Returns
MotionHandle
BindToPitch
Schedule a tween that writes the interpolated value to Pitch on the bound target and return its MotionHandle.
public static MotionHandle BindToPitch(this FloatMotionBuilder builder, AudioSource audioSource)Parameters and return value
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.audioSourceAudioSourceTarget AudioSource that receives the update.- Returns
MotionHandle
public static MotionHandle BindToPitch<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, AudioSource audioSource)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>Parameters and return value
builderthis MotionBuilder<float, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.audioSourceAudioSourceTarget AudioSource that receives the update.- Returns
MotionHandle
BindToAudioMixerFloat
Schedule a tween that writes the interpolated value to AudioMixerFloat on the bound target and return its MotionHandle.
public static MotionHandle BindToAudioMixerFloat(this FloatMotionBuilder builder, AudioMixer audioMixer, string name)Parameters and return value
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.audioMixerAudioMixerTarget AudioMixer that receives the update.namestringName of the target property.- Returns
MotionHandle
public static MotionHandle BindToAudioMixerFloat<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, AudioMixer audioMixer, string name)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>Parameters and return value
builderthis MotionBuilder<float, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.audioMixerAudioMixerTarget AudioMixer that receives the update.namestringName of the target property.- Returns
MotionHandle
MeatMotion