|
TopDown Engine v4.5
|
A scriptable object used to store data for MMSoundManager play. More...
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 |
A scriptable object used to store data for MMSoundManager play.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| 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
| 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.
| 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
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.BypassEffects = false |
Bypass effects (Applied from filter components or global listener filters).
| 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.
| 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.
| AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.CustomRolloffCurve |
the curve to use for custom volume rolloff if UseCustomRolloffCurve is true
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.DoNotPlayIfClipAlreadyPlaying = false |
whether or not this sound should play if the same sound clip is already playing
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.DopplerLevel = 1f |
Sets the Doppler scale for this AudioSource.
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeIn = false |
whether or not to fade this sound in when playing it
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeInDuration = 1f |
if fading, the duration of the fade, in seconds
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeInInitialVolume = 0f |
if fading, the volume at which to start the fade
| MMTweenType MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeInTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic, "FadeIn") |
if fading, the tween over which to fade the sound
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeOutDuration = 1f |
if fading out, the duration of the fade, in seconds
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeOutOnStop = false |
whether or not to fade this sound in when stopping the feedback
| MMTweenType MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.FadeOutTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic, "FadeOutOnStop") |
if fading out, the tween over which to fade the sound
| 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.
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Loop = false |
whether or not this sound should loop
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaxDistance = 500f |
(Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.
| 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
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaxPitch = 1f |
the maximum pitch to play the sound at
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MaxVolume = 1f |
the maximum volume to play the sound at
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MinDistance = 1f |
Within the Min distance the AudioSource will cease to grow louder in volume.
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MinPitch = 1f |
the minimum pitch to play the sound at
| float MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.MinVolume = 1f |
the minimum volume to play the sound at
| 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
| 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.
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Persistent = false |
whether or not this sound should continue playing when transitioning to another scene
| 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.
| 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)
| int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Priority = 128 |
Sets the priority of the AudioSource.
| AudioClip [] MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RandomSfx |
an array to pick a random sfx from
| 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
| 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
| 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.
| AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.ReverbZoneMixCurve |
the curve to use for custom reverb zone mix if UseReverbZoneMixCurve is true
| AudioRolloffMode MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.RolloffMode = AudioRolloffMode.Logarithmic |
Sets/Gets how the AudioSource attenuates over distance.
| 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
| 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
| 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
| AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Sfx |
the sound clip to play
| 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
| 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
| 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.
| AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SpatialBlendCurve |
the curve to use for custom spatial blend if UseSpatialBlendCurve is true
| int MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.Spread = 0 |
Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.
| AnimationCurve MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.SpreadCurve |
the curve to use for custom spread if UseSpreadCurve is true
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.StopSoundOnFeedbackStop = false |
if this is true, this sound will stop playing when stopping the feedback
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.TestPlaySoundButton |
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseCustomRolloffCurve = false |
whether or not to use a custom curve for custom volume rolloff
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseReverbZoneMixCurve = false |
whether or not to use a custom curve for reverb zone mix
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseSpatialBlendCurve = false |
whether or not to use a custom curve for spatial blend
| bool MoreMountains.Feedbacks.MMF_MMSoundManagerSoundData.UseSpreadCurve = false |
whether or not to use a custom curve for spread