This is a simple script to manage one shot sounds in unity.
- Attach this script to any GameObject (MainCamera, EmptyGameObject, etc.);
- Put your sounds in the script inspector within Unity3D;
- Add an audio source to any GameObject (strongly recommended to add to the same GameObject as the sound manager script);
- When you need to call the one shot sound simply add: Sounds.PlaySound (SoundsGame.sound1) in any script (i.e.: EnemyHit) changing "sound1" to desired;
- Fork the repository on Github;
- Clone the project into your machine;
- Commit your changes to your own branch;
- Push your work to your fork;
- Submit a pull request for review;
This project is under Apache 2.0 license.