SFXSettings#
- NAMESPACE:
UnityUtils.ScriptUtils.Audio
The multiple settings that SFX and MusicClip use.
SFXVolumeSettings#
- UnityUtils.ScriptUtils.Audio.SFXVolumeSettings
Public Functions
- SFXVolumeSettings SetVolume (float volume, AudioManager.VolumeType volumeType=AudioManager.VolumeType.SFX)
Sets the volume to volume and volumeType to volumeType for this SFX. Audio gets randomly played between the min and max volume.
Public Members
- AudioManager.VolumeType volumeType
AudioManager.VolumeType to play this SFX as.
see AudioManager.CalculateVolumeBasedOnType(float, AudioManager.VolumeType) to get more info.
SFXPitchSettings#
- UnityUtils.ScriptUtils.Audio.SFXPitchSettings
Public Functions
-
SFXPitchSettings SetPitch(float pitchVariance = AudioManager.DEFAULT_PITCH_VARIANCE, float pitch = 1)#
Sets the pitch and pitchVariance for this SFX.
Public Members
-
float pitchVariance#
Using the pitch, adds an offset by -/+ pitchVariance.
Used to make clips not feel so repetative.
Defaults to AudioManager.DEFAULT_PITCH_VARIANCE.
-
float pitch#
The pitch the AudioClip gets played at.
Defaults to 1.0
-
SFXPitchSettings SetPitch(float pitchVariance = AudioManager.DEFAULT_PITCH_VARIANCE, float pitch = 1)#
SFX3dSettings#
- UnityUtils.ScriptUtils.Audio.SFX3dSettings
Public Functions
-
SFX3dSettings SetSpacialAudio(Vector3 localPosition, float spacialBlend = 1)#
Sets the localPosition and spacialBlend for this SFX.
- Parameters:
localPosition –
spacialBlend –
Public Members
-
Vector3 localPosition = Vector3.zero#
The Vector3 position to play this at. Used in turn with spacialBlend.
-
float spacialBlend#
Value between 0 and 1 (inclusive) that decides if an AudioClip is spacial audio. 0 is no spacial audio, 1 is spacial audio.
-
SFX3dSettings SetSpacialAudio(Vector3 localPosition, float spacialBlend = 1)#
SFXDestructionSettings#
- UnityUtils.ScriptUtils.Audio.SFXDestructionSettings
Public Functions
-
SFXDestructionSettings SetDestructionSettings(bool destroyOnClipEnd = true, bool useRealtimeToDestroy = true, bool scenePersistant = false)#
Set the settings on this SFXDestructionSettings.
Public Members
-
bool destroyOnClipEnd = true#
If true, will destroy the clip when its done playing. Otherwise it will not.
-
bool useRealtimeToDestroy = true#
If true, will wait for the clip length in realtime before getting destroyed.
-
bool scenePersistant = false#
IS NOT IMPLIMENTED YET. If true, will not get destroyed when the scene changes.
-
SFXDestructionSettings SetDestructionSettings(bool destroyOnClipEnd = true, bool useRealtimeToDestroy = true, bool scenePersistant = false)#