Manual

SoundyData

class in Doozy.Engine.Soundy

Description

SoundyData is a data settings container used by the UIAction class in order to trigger the playing of a sound via Soundy, a direct AudioClip reference or a MasterAudio sound name.

Public Variables

  • public AudioClip AudioClip – Direct reference to an AudioClip (enabled only for SoundSource.AudioClip)

  • public string DatabaseNameSoundDatabase database name that contains the sound name (enabled only for SoundSource.Soundy)

  • public AudioMixerGroup OutputAudioMixerGroup – Direct reference to an AudioMixerGroup that the referenced AudioClip will get routed through when played (enabled only for SoundSource.AudioClip)

  • public string SoundName – Sound name of a SoundGroupData that holds settings and references to one or more AudioClips (enabled only for SoundSource.Soundy and SoundSource.MasterAudio)

  • public SoundSource SoundSource – Selects the sound source that will provide the sound that will get played

Constructors

  • public SoundyData() – Creates a new instance for this class

Public Methods

  • public SoundGroupData GetAudioData() – Returns a SoundGroupData reference from the database with the set DatabaseName and SoundName. If the sound database does not exist, or no SoundGroupData with the given sound name is found, it returns null.

  • public void Reset() – Resets this instance to the default values

  • public SoundyData SetAudioClip(AudioClip audioClip) – Sets the AudioClip (usable only if the SoundSource is set to AudioClip)

  • public SoundyData SetDatabaseName(string databaseName) – Sets the DatabaseName that contains the sound name (usable only if the SoundSource is set to Soundy)

  • public SoundyData SetOutputAudioMixerGroup(AudioMixerGroup audioMixerGroup) – Sets the AudioMixerGroup (usable only if the SoundSource is set to AudioClip)

  • public SoundyData SetSoundName(string soundName) – Sets the Sound name of a SoundGroupData that holds settings and references to one or more audio clips (usable only if the SoundSource is set to Soundy or MasterAudio)

  • public SoundyData SetSoundSource(SoundSource soundSource) – Sets the SoundSource that will provide the sound that will get played