SoundPackSO
Scriptable Object that holds all the Data for Sound Packs
Fields
title(string): The title of the sound pack.soundFile(AudioClip): The audio clip associated with the sound pack.useRandomPitch(bool): Indicates whether random pitch is used for the sound pack.minPitch(float): The minimum pitch value when random pitch is used.maxPitch(float): The maximum pitch value when random pitch is used.namedKeys(GenericDictionary<KeyCode, SoundMap>): A dictionary mapping KeyCode values to SoundMap objects.fallbackKeys(GenericDictionary<int, int>): A dictionary containing fallback key mappings.includesNumpad(bool): Indicates whether the sound pack includes numpad keys.
Methods
InitializeNamedKeys(): Initializes namedKeys with default KeyCode mappings.SetRandomFallbacks(): Sets random fallbacks based on the namedKeys.SaveToCsv(): Saves the sound pack data to a CSV file.LoadFromCSV(): Loads sound pack data from a CSV file.
Remarks
The
InitializeNamedKeysmethod initializes the namedKeys dictionary with default KeyCode mappings.The
SetRandomFallbacksmethod sets random fallbacks based on the namedKeys dictionary.The
SaveToCsvmethod saves the sound pack data to a CSV file.The
LoadFromCSVmethod loads sound pack data from a CSV file.
Last updated