Skip to content

Lightweight Unity Utility to quickly setup and play audio

License

Notifications You must be signed in to change notification settings

sgaumin/AudioExpress

Repository files navigation

AudioExpress

Unity 2018.4+ License: MIT

Unity library to setup and play 2D sound in a more convenient way: no need to attach a AudioSource component, all is managed in the background.

Installation

Simply import this package with Unity Package Manager by using the url https://github.com/sgaumin/AudioExpress.git

System Requirements

Unity 2018.4 or later versions. Don't forget to include the AudioExpress namespace.

Overview

Inspector

From the inspector, we can assign audio clip and edit parameters

Unity_HsQ9A4fd5Y

If you follow the hierarchy Assets/Sounds/Audio Mixer.mixer, mixer group will be automatically attached as well. Just make sure that the audio clip and the mixer group share the same name.

Unity_5mVYeFgDDV

Scene View

In the scene, Audio Units are automatically created and rearranged under an object called AudioParent

Unity_hNt8T6NLnu

Code Example

using AudioExpress

public class PlayerController : MonoBehaviour
{
	[Header("Audio")]
	[SerializeField] private AudioConfig movementSound;

	public void Move()
	{
		movementSound.Play();
	}
}

License

MIT License