Most sounds were generated using
Elevenlabs then cleaned using Audacity
class static Sounds
Description
This is main utility for all sounds.
An easy sound system built upon unity, with features such as preloading, random ranges, random pitch, easy oneshots and more.
You can use ranges of sounds:
For example, let's have 3 explosion sounds: "explosion0", "explosion1", "explosion2" in a Resources folder.
Sounds.PlayAudio("explosion", explosion_position)
will play a random sound between those 3 sounds which contain the given prefix "explosion".
Good practice:
For playing a random sounds, you may use Sounds.PlayAudio(string name)
.
For playing a unique sound, reference the AudioClip and use Sounds.PlayAudio(AudioClip audio)
for better performance.
Methods:
static void PlayAudio(string audioName, Vector3 position, float volume = 1)
Will search for a audio file named audioName and play it at position and at a volume.
The audio must be in a "Resources" folder and will be preload upon game start. (SIO folder: Assets/Resources/Audio)
static AudioClip GetAudioClip(string audioName)
Will search for a audio file named audioName and return its AudioClip.
The audio must be in a "Resources" folder and will be preload upon game start.