TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData Class Reference

A scriptable object used to store data for MMSoundManager play. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData:

Public Member Functions

virtual void Play (Vector3 position)
virtual void RandomizeTimes ()
virtual async void TestPlaySound ()

Public Attributes

AudioClip Sfx
 the sound clip to play
AudioClip[] RandomSfx
 an array to pick a random sfx from
bool SequentialOrder = false
 if this is true, random sfx audio clips will be played in sequential order instead of at random
bool SequentialOrderHoldLast = false
 if we're in sequential order, determines whether or not to hold at the last index, until either a cooldown is met, or the ResetSequentialIndex method is called
float SequentialOrderHoldCooldownDuration = 2f
 if we're in sequential order hold last mode, index will reset to 0 automatically after this duration, unless it's 0, in which case it'll be ignored
bool RandomUnique = false
 if this is true, sfx will be picked at random until all have been played. once this happens, the list is shuffled again, and it starts over
float MinVolume = 1f
 the minimum volume to play the sound at
float MaxVolume = 1f
 the maximum volume to play the sound at
float MinPitch = 1f
 the minimum pitch to play the sound at
float MaxPitch = 1f
 the maximum pitch to play the sound at
Vector2 PlaybackTime = new Vector2(0f, 0f)
 a timestamp (in seconds, randomized between the defined min and max) at which the sound will start playing, equivalent to the Audiosource API's Time)
Vector2 PlaybackDuration = new Vector2(0f, 0f)
 a duration (in seconds, randomized between the defined min and max) for which the sound will play before stopping. Ignored if min and max are zero.
MMSoundManager.MMSoundManagerTracks MmSoundManagerTrack = MMSoundManager.MMSoundManagerTracks.Sfx
 the track on which to play the sound. Pick the one that matches the nature of your sound
int ID = 0
 the ID of the sound. This is useful if you plan on using sound control feedbacks on it afterwards.
AudioMixerGroup AudioGroup = null
 the AudioGroup on which to play the sound. If you're already targeting a preset track, you can leave it blank, otherwise the group you specify here will override it.
AudioSource RecycleAudioSource = null
 if (for some reason) you've already got an audiosource and wouldn't like to use the built-in pool system, you can specify it here
bool Loop = false
 whether or not this sound should loop
bool Persistent = false
 whether or not this sound should continue playing when transitioning to another scene
bool DoNotPlayIfClipAlreadyPlaying = false
 whether or not this sound should play if the same sound clip is already playing
int MaximumConcurrentInstances = -1
 the maximum amount of instances of this sound allowed to play at once. use -1 for unlimited concurrent plays
bool StopSoundOnFeedbackStop = false
 if this is true, this sound will stop playing when stopping the feedback
bool FadeIn = false
 whether or not to fade this sound in when playing it
float FadeInInitialVolume = 0f
 if fading, the volume at which to start the fade
float FadeInDuration = 1f
 if fading, the duration of the fade, in seconds
MMTweenType FadeInTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic, "FadeIn")
 if fading, the tween over which to fade the sound
bool FadeOutOnStop = false
 whether or not to fade this sound in when stopping the feedback
float FadeOutDuration = 1f
 if fading out, the duration of the fade, in seconds
MMTweenType FadeOutTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic, "FadeOutOnStop")
 if fading out, the tween over which to fade the sound
bool SoloSingleTrack = false
 whether or not this sound should play in solo mode over its destination track. If yes, all other sounds on that track will be muted when this sound starts playing
bool SoloAllTracks = false
 whether or not this sound should play in solo mode over all other tracks. If yes, all other tracks will be muted when this sound starts playing
bool AutoUnSoloOnEnd = false
 if in any of the above solo modes, AutoUnSoloOnEnd will unmute the track(s) automatically once that sound stops playing
float PanStereo
 Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or Stereo.
float SpatialBlend
 Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D.
Transform AttachToTransform
 a Transform this sound can 'attach' to and follow it along as it plays - when used on a feedback, will only apply if the feedback's AttachToTransform is empty
bool BypassEffects = false
 Bypass effects (Applied from filter components or global listener filters).
bool BypassListenerEffects = false
 When set global effects on the AudioListener will not be applied to the audio signal generated by the AudioSource. Does not apply if the AudioSource is playing into a mixer group.
bool BypassReverbZones = false
 When set doesn't route the signal from an AudioSource into the global reverb associated with reverb zones.
int Priority = 128
 Sets the priority of the AudioSource.
float ReverbZoneMix = 1f
 The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones.
float DopplerLevel = 1f
 Sets the Doppler scale for this AudioSource.
int Spread = 0
 Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.
AudioRolloffMode RolloffMode = AudioRolloffMode.Logarithmic
 Sets/Gets how the AudioSource attenuates over distance.
float MinDistance = 1f
 Within the Min distance the AudioSource will cease to grow louder in volume.
float MaxDistance = 500f
 (Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.
bool UseCustomRolloffCurve = false
 whether or not to use a custom curve for custom volume rolloff
AnimationCurve CustomRolloffCurve
 the curve to use for custom volume rolloff if UseCustomRolloffCurve is true
bool UseSpatialBlendCurve = false
 whether or not to use a custom curve for spatial blend
AnimationCurve SpatialBlendCurve
 the curve to use for custom spatial blend if UseSpatialBlendCurve is true
bool UseReverbZoneMixCurve = false
 whether or not to use a custom curve for reverb zone mix
AnimationCurve ReverbZoneMixCurve
 the curve to use for custom reverb zone mix if UseReverbZoneMixCurve is true
bool UseSpreadCurve = false
 whether or not to use a custom curve for spread
AnimationCurve SpreadCurve
 the curve to use for custom spread if UseSpreadCurve is true
bool TestPlaySoundButton

Protected Member Functions

virtual void Initialization ()
virtual AudioSource PlaySound (AudioClip sfx, Vector3 position)
virtual AudioClip PickRandomClip ()
virtual void PlayAudioSource (AudioSource audioSource, AudioClip sfx, float volume, float pitch, float time, float playbackDuration)

Protected Attributes

AudioClip _randomClip
MMShufflebag< int > _randomUniqueShuffleBag
int _currentIndex
float _randomPlaybackTime
float _randomPlaybackDuration
MMSoundManagerPlayOptions _options
AudioSource _playedAudioSource
AudioClip _lastPlayedClip
bool _initialized = false
AudioSource _editorAudioSource
float _lastPlayTimestamp = -float.MaxValue

Detailed Description

A scriptable object used to store data for MMSoundManager play.

Member Function Documentation

◆ Initialization()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Initialization ( )
protectedvirtual

◆ PickRandomClip()

virtual AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.PickRandomClip ( )
protectedvirtual

◆ Play()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Play ( Vector3 position)
virtual

◆ PlayAudioSource()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.PlayAudioSource ( AudioSource audioSource,
AudioClip sfx,
float volume,
float pitch,
float time,
float playbackDuration )
protectedvirtual

◆ PlaySound()

virtual AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.PlaySound ( AudioClip sfx,
Vector3 position )
protectedvirtual

◆ RandomizeTimes()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RandomizeTimes ( )
virtual

◆ TestPlaySound()

virtual async void MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.TestPlaySound ( )
virtual

Member Data Documentation

◆ _currentIndex

int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._currentIndex
protected

◆ _editorAudioSource

AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._editorAudioSource
protected

◆ _initialized

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._initialized = false
protected

◆ _lastPlayedClip

AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._lastPlayedClip
protected

◆ _lastPlayTimestamp

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._lastPlayTimestamp = -float.MaxValue
protected

◆ _options

MMSoundManagerPlayOptions MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._options
protected

◆ _playedAudioSource

AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._playedAudioSource
protected

◆ _randomClip

AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._randomClip
protected

◆ _randomPlaybackDuration

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._randomPlaybackDuration
protected

◆ _randomPlaybackTime

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._randomPlaybackTime
protected

◆ _randomUniqueShuffleBag

MMShufflebag<int> MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData._randomUniqueShuffleBag
protected

◆ AttachToTransform

Transform MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.AttachToTransform

a Transform this sound can 'attach' to and follow it along as it plays - when used on a feedback, will only apply if the feedback's AttachToTransform is empty

◆ AudioGroup

AudioMixerGroup MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.AudioGroup = null

the AudioGroup on which to play the sound. If you're already targeting a preset track, you can leave it blank, otherwise the group you specify here will override it.

◆ AutoUnSoloOnEnd

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.AutoUnSoloOnEnd = false

if in any of the above solo modes, AutoUnSoloOnEnd will unmute the track(s) automatically once that sound stops playing

◆ BypassEffects

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.BypassEffects = false

Bypass effects (Applied from filter components or global listener filters).

◆ BypassListenerEffects

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.BypassListenerEffects = false

When set global effects on the AudioListener will not be applied to the audio signal generated by the AudioSource. Does not apply if the AudioSource is playing into a mixer group.

◆ BypassReverbZones

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.BypassReverbZones = false

When set doesn't route the signal from an AudioSource into the global reverb associated with reverb zones.

◆ CustomRolloffCurve

AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.CustomRolloffCurve

the curve to use for custom volume rolloff if UseCustomRolloffCurve is true

◆ DoNotPlayIfClipAlreadyPlaying

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.DoNotPlayIfClipAlreadyPlaying = false

whether or not this sound should play if the same sound clip is already playing

◆ DopplerLevel

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.DopplerLevel = 1f

Sets the Doppler scale for this AudioSource.

◆ FadeIn

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeIn = false

whether or not to fade this sound in when playing it

◆ FadeInDuration

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeInDuration = 1f

if fading, the duration of the fade, in seconds

◆ FadeInInitialVolume

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeInInitialVolume = 0f

if fading, the volume at which to start the fade

◆ FadeInTween

MMTweenType MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeInTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic, "FadeIn")

if fading, the tween over which to fade the sound

◆ FadeOutDuration

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeOutDuration = 1f

if fading out, the duration of the fade, in seconds

◆ FadeOutOnStop

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeOutOnStop = false

whether or not to fade this sound in when stopping the feedback

◆ FadeOutTween

MMTweenType MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeOutTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic, "FadeOutOnStop")

if fading out, the tween over which to fade the sound

◆ ID

int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.ID = 0

the ID of the sound. This is useful if you plan on using sound control feedbacks on it afterwards.

◆ Loop

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Loop = false

whether or not this sound should loop

◆ MaxDistance

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaxDistance = 500f

(Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.

◆ MaximumConcurrentInstances

int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaximumConcurrentInstances = -1

the maximum amount of instances of this sound allowed to play at once. use -1 for unlimited concurrent plays

◆ MaxPitch

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaxPitch = 1f

the maximum pitch to play the sound at

◆ MaxVolume

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaxVolume = 1f

the maximum volume to play the sound at

◆ MinDistance

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MinDistance = 1f

Within the Min distance the AudioSource will cease to grow louder in volume.

◆ MinPitch

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MinPitch = 1f

the minimum pitch to play the sound at

◆ MinVolume

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MinVolume = 1f

the minimum volume to play the sound at

◆ MmSoundManagerTrack

MMSoundManager.MMSoundManagerTracks MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MmSoundManagerTrack = MMSoundManager.MMSoundManagerTracks.Sfx

the track on which to play the sound. Pick the one that matches the nature of your sound

◆ PanStereo

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.PanStereo

Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or Stereo.

◆ Persistent

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Persistent = false

whether or not this sound should continue playing when transitioning to another scene

◆ PlaybackDuration

Vector2 MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.PlaybackDuration = new Vector2(0f, 0f)

a duration (in seconds, randomized between the defined min and max) for which the sound will play before stopping. Ignored if min and max are zero.

◆ PlaybackTime

Vector2 MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.PlaybackTime = new Vector2(0f, 0f)

a timestamp (in seconds, randomized between the defined min and max) at which the sound will start playing, equivalent to the Audiosource API's Time)

◆ Priority

int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Priority = 128

Sets the priority of the AudioSource.

◆ RandomSfx

AudioClip [] MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RandomSfx

an array to pick a random sfx from

◆ RandomUnique

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RandomUnique = false

if this is true, sfx will be picked at random until all have been played. once this happens, the list is shuffled again, and it starts over

◆ RecycleAudioSource

AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RecycleAudioSource = null

if (for some reason) you've already got an audiosource and wouldn't like to use the built-in pool system, you can specify it here

◆ ReverbZoneMix

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.ReverbZoneMix = 1f

The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones.

◆ ReverbZoneMixCurve

AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.ReverbZoneMixCurve

the curve to use for custom reverb zone mix if UseReverbZoneMixCurve is true

◆ RolloffMode

AudioRolloffMode MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RolloffMode = AudioRolloffMode.Logarithmic

Sets/Gets how the AudioSource attenuates over distance.

◆ SequentialOrder

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SequentialOrder = false

if this is true, random sfx audio clips will be played in sequential order instead of at random

◆ SequentialOrderHoldCooldownDuration

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SequentialOrderHoldCooldownDuration = 2f

if we're in sequential order hold last mode, index will reset to 0 automatically after this duration, unless it's 0, in which case it'll be ignored

◆ SequentialOrderHoldLast

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SequentialOrderHoldLast = false

if we're in sequential order, determines whether or not to hold at the last index, until either a cooldown is met, or the ResetSequentialIndex method is called

◆ Sfx

AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Sfx

the sound clip to play

◆ SoloAllTracks

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SoloAllTracks = false

whether or not this sound should play in solo mode over all other tracks. If yes, all other tracks will be muted when this sound starts playing

◆ SoloSingleTrack

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SoloSingleTrack = false

whether or not this sound should play in solo mode over its destination track. If yes, all other sounds on that track will be muted when this sound starts playing

◆ SpatialBlend

float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SpatialBlend

Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D.

◆ SpatialBlendCurve

AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SpatialBlendCurve

the curve to use for custom spatial blend if UseSpatialBlendCurve is true

◆ Spread

int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Spread = 0

Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.

◆ SpreadCurve

AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SpreadCurve

the curve to use for custom spread if UseSpreadCurve is true

◆ StopSoundOnFeedbackStop

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.StopSoundOnFeedbackStop = false

if this is true, this sound will stop playing when stopping the feedback

◆ TestPlaySoundButton

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.TestPlaySoundButton

◆ UseCustomRolloffCurve

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseCustomRolloffCurve = false

whether or not to use a custom curve for custom volume rolloff

◆ UseReverbZoneMixCurve

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseReverbZoneMixCurve = false

whether or not to use a custom curve for reverb zone mix

◆ UseSpatialBlendCurve

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseSpatialBlendCurve = false

whether or not to use a custom curve for spatial blend

◆ UseSpreadCurve

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseSpreadCurve = false

whether or not to use a custom curve for spread


The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/Feedbacks/MMF_MMSoundManagerSoundData.cs