Learn / Documentation / Script Reference / SoundDatabase
Manual

SoundDatabase

class in Doozy.Engine.Soundy / Inherits from: ScriptableObject

Description

The SoundDatabase is a database of SoundGroupData, used by Soundy
See Also: SoundGroupData

Public Variables

  •  public List<SoundGroupData> Database – List of references to SoundGroupData assets

  •  public string DatabaseName – The database name

  •  public AudioMixerGroup OutputAudioMixerGroup – The output audio mixer group that all the sounds contained in this database will get routed through when playing

  •  public List SoundNames – List of all the SoundGroupData sound names that this database contains

Public Methods

  • public bool Add(SoundGroupData data, bool saveAssets) – Adds a new entry, a SoundGroupData, to the database. Returns TRUE if the operation was successful

  • public SoundGroupData Add(string soundName, bool performUndo, bool saveAssets) – Adds a new entry, a sound name, to the database. Returns a reference to the newly added SoundGroupData

  • public bool Contains(string soundName) – Returns TRUE if the sound name has been found in the database

  • public bool Contains(SoundGroupData soundGroupData) – Returns TRUE if the SoundGroupData has been found in the database

  • public SoundGroupData GetData(string soundName) – Iterates through the database to look for the given sound name to return the corresponding SoundGroupData. If the name does not exist, it will return null

  • public void Initialize(bool saveAssets) – Looks if this database has the ‘No Sound’ option. If it does not, it adds it

  • public void RefreshDatabase(bool performUndo, bool saveAssets) – Refreshes the entire database by removing empty, duplicate and unnamed entries, sorting the database and updating the sound names list

  • public bool Remove(SoundGroupData data, bool showDialog = false, bool saveAssets = false) – Iterates through the database to look for the data. If found, removes the entry and returns TRUE

  • public void RemoveEntriesWithNoAudioClipsReferenced(bool performUndo, bool saveAssets = false) – Removes any entries that have no AudioClip referenced

  • public void RemoveDuplicateEntries(bool performUndo, bool saveAssets = false) – Removes any duplicate entries found in the database

  • public void RemoveUnnamedEntries(bool performUndo, bool saveAssets = false) – Removes any entries that have no name

  • public void SetDirty(bool saveAssets) – [Editor Only] Marks target object as dirty. (Only suitable for non-scene objects)

  • public void Sort(bool performUndo, bool saveAssets = false) – Sorts the entire database by sound name

  • public void UndoRecord(string undoMessage) – Records any changes done on the object after this function

  • public void UpdateSoundNames(bool saveAssets) – Updates the list of sound names found in the database