# Sound Manager by Ecsso

### This is a Sound Manager ready to import in your project.


## 1. Setup scene

- Add the Sound Manager Prefab in your scene
- Make sure he has an AudioSourcePrefab and the Wait and Used pool empty game object in references

## 2. Create data

- Create a ScriptableObject to save the sound data. <br>
    > Right click on your Project window -> SoundManager -> newSoundData
- Change the parameters like you want.

## 3. Use the sound in game

### a. UnityEvents
Put the scriptable object in an UnityEvents and call the function <code>PlaySound()</code>

### b. Call in script

Create a <code>SourceSound</code> field, in the <strong>inspector</strong> you can add the scriptable object and set a position where you want to play the sound in your scene. <br>
In script call the <code>PlaySound()</code> function of the SourceSound field.  


## Credit

Ecsso : https://github.com/Ecssooo


