Skip to content

DaniKog/Audio_Controller_Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio_Controller_Example

The Audio Management System from a small project I worked on called ROTA.
ROTA by Erich Kohlweg: http://gamejolt.com/games/rota/46815
Originally made in untiy 4.6
Recompiled for Untiy 5.1

How This Works

The Audio for the game is handled with 2 sound sources and 4 Audio Classes

1. SFX Master

https://github.com/DaniKog/Audio_Controller_Example/blob/master/Assets/Scripts/Audio/SFXMaster.cs
The SFX Master handles all the SFX in the game, it is a prefab that has one audio source and it assigns the right clip before playing it.

2. UI_Audio

https://github.com/DaniKog/Audio_Controller_Example/blob/master/Assets/Scripts/Audio/UI_Audio.cs
This class handles all the UI audio. This prefab has a sound source as well, it plays UI sounds when needed.

3. Mixer

https://github.com/DaniKog/Audio_Controller_Example/blob/master/Assets/Scripts/Audio/Mixer.cs
Mixer class is an improvised mixer, a list of floats that save the volumes of each SFX and changes the voliume of the sound source before playing the sound. It was done before Untiy 5 came out with it's own mixer.

4. Audio Manager

https://github.com/DaniKog/Audio_Controller_Example/blob/master/Assets/Scripts/Audio/AudioManager.cs
The instance of this class only exists on the main menu. It checks if the other classes exist in the scene and creates them from resources if they don't.

About

The Audio Management System from Rota

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages