⌨️
Thock
Get Thock
  • About
    • ⌨️Description
    • 🚀Quick Start
    • ™️Third-Party information
    • Sample Scenes
      • Example_ScreenTypewriter-and-Soundpacks
      • Example_Type
      • Example_StringEvents
  • Documentation
    • Thock
    • Convert JSON to Soundpack
      • ConvertJsonToSoundpack
    • Utilities
      • StringEventListener
        • StringEventListener Component Tutorial
      • KeyPressEventReceiver
      • KeyPressEventSender
    • Scriptable-Objects
      • SoundPackSO
      • IntToKeyCodeTable
      • StereoAudioMapping
      • StringToKeycodeTable
    • Types
      • SoundMap
Powered by GitBook
On this page
  1. Documentation
  2. Scriptable-Objects

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 InitializeNamedKeys method initializes the namedKeys dictionary with default KeyCode mappings.

  • The SetRandomFallbacks method sets random fallbacks based on the namedKeys dictionary.

  • The SaveToCsv method saves the sound pack data to a CSV file.

  • The LoadFromCSV method loads sound pack data from a CSV file.

PreviousScriptable-ObjectsNextIntToKeyCodeTable

Last updated 1 year ago