Wise Audio Player


Why ... Usage ... Check the screenshots for visual presentation or the github page for detailed ... AudioSourcePlayer - Replacement for the traditional AudioSource component. ... For example:


by DevLocker


Price History +

Simple audio framework that replaces the traditional Unity AudioSource component with a similar one that offers more features and customization.

>>> GitHub | OpenUPM <<<


Why

The Unity AudioSource component is very limited, and when you want to change a sound you have to hunt down all the prefabs and scenes that reference the old one. To remedy this, Unity added the AudioRandomContainer, which acts as an audio proxy asset that can hold a list of sounds played in a given pattern. Sadly, the UI is terrible and it doesn't give you much flexibility.

You can find a lot of audio manager and toolkit alternatives that solve these issues by placing all sound definitions in a centralized database (prefab or scriptable object) and then playing them by name string. This approach has some disadvantages:

  • Having all sound definitions in one place causes conflicts when collaborating
  • All sounds get loaded into memory along with the database (prefab or scriptable object)
  • It needs a custom editor UI to browse and manage the sounds list, which is usually clunky
  • Using strings to refer to audio assets goes against the Unity way of doing things

To avoid these disadvantages, an audio framework needs to decentralize the sound definitions into separate asset files and just use references to them directly. This is exactly what Wise Audio Player does.


Studios often write their own wrapper around AudioSource like this one, reinventing the wheel. Now you can just use this plugin instead.


Usage

This audio framework revolves around the AudioSourcePlayer component and the AudioPlayerAsset scriptable object. Check the screenshots for visual presentation or the github page for detailed explanation.

  • AudioSourcePlayer - Replacement for the traditional AudioSource component. It can use AudioClips or customizable Audio Asset.
  • AudioPlayerAsset - serves as an audio proxy that lets you easily change what and how sounds should be played. Working with audio assets separated from sources helps collaboration. Holds list of conductors that actually play the sound.
  • Conductors - customizable classes that play your sound. There are different types of conductors for different use cases. For example:
    • Collection Conductor - plays a sound picked from a list. Can play them in sequential, shuffle, or random order.
    • Pitch Sequence Conductor - plays the same sound every time, but changes the pitch according to your settings.
    • Intro Then Loop Conductor - plays an intro sound then loops another. Useful for music.
    • Loop Sequence Overlapping Conductor - loops sounds from a list by overlapping them (starts playing the next one before the last one finishes).
  • Filters - each conductor has a filter that checks whether it should be played, and only the first allowed one is used.
  • Audio Monitor Window - editor window that shows what sounds were played at what time and what distance from the camera.