Step 2.5 - Audio Manager
Adding the Audio Manager
Add the "AK_AudioManager" from the prefabs folder or the "Adventure_Kit_Managers" pack to add all to the hierarchy. You can add the "AK_AudioManager" script to an empty gameobject if you want to start fresh.
Adding more elements / tracks to the Audio Manager
Adding more audio clips: On the Audio Manager you can increment the "Size" value of the manager array to add a new element so you can add more 2D sounds.
How to reference the Audio Manager?
//Add this namespace to the top of the script to reference the adventure kit
using AdventurePuzzleKit;
//How to play a sound using the name of your audio from the array
AKAudioManager.instance.Play("YourAudioClip");
//How to stop playing a specific audio clip
AKAudioManager.instance.StopPlaying("YourAudioClip");
Screenshot of the Audio Manager

Details of the settings of the Audio Manager
Name
The name of the audio clip you will reference in code
Clip
Add the sound effect from the "Sounds folder" to this slot
Empty Box
Volume
The volume of your audio clip
Default :1
Volume Variance
Default can be set to 0.
Default: 0
Pitch
Setting the Pitch of your audio clip
Default: 1
Pitch Variance
The default variance of the audio pitch
Default: 0
Loop
Set whether you want the audio clip to loop
Tickbox
Mixer Group
If you want to keep the mixer group for audio
Mixer Group
Do you want to see a list of the audio references on the default "AudioManager" prefab? Click the link below:
Last updated
Was this helpful?