Papae - AudioManager is a free unity library for audio
AudioManager is a free unity library for audio. It provides a simple way for programmers to manage and control your 2D game’s background music and sound effects.
Import the Papae-AudioManager.unitypackage or just copy the AudioManager.cs script anywhere inside Assets folder and you are ready to go
Drag and drop the AudioManager.prefab gameobject anywhere in the scene or hierarchy, edit any properties visible in the Inspector then call any API related function or attribute from code
Or attach or add the AudioManager component to an empty game object in the scene, and call any API related function or attribute from code
Or just fire or call any API related function or attribute from code
Note that you have to import the namespace Papae.UnitySDK.Managers to use the AudioManager in script
AudioManager.Instance.PlayBGM(sound_clip, MusicTransition.LinearFade, 4f);
AudioManager.Instance.PlaySFX(sound_clip, 10f);
AudioManager.Instance.RepeatSFX(clip, world_location, 5);
AudioManager.Instance.LoadClip(resources_path, true);
AudioManager.Instance.PlayOneShot(AudioManager.Instance.GetClipFromPlaylist(“clip_name”));
AudioManager.Instance.RepeatSFX(clip, -1, true);
Note: You can also use the PlaySFX to loop a sound forever. Just pass the float.PositiveInfinity as the duration parameter.
AudioManager.Instance.LoadClip(url_string, AudioType.WAV, false, callback);
Read the API Reference for more information.
Version 1.3.1
MIT License. Copyright 2016 Oluwaseye Ayinla.