Unity AudioSource Settings
Allow to save all AudioSource values to ScriptableObject, to:
- setup runtime-created AudioSources
- keep settings of multiplie AudioSources in sync
- create RingBuffer of AudioSources
Problem
I. Multiplie AS + same settings = Impossible
built-in Presets-system is Editor-Only
II. No way to setup Runtime-created/prespawned AS in different Prefabs/Scenes
You have to:
- open each context (prefab / scene)
- select certain AudioSources
- setup source
- repeat for each context
- repeat each time, to maintain AudioSources values in sync
or
- runtime - hardcode generated settings in code
- write your own Presets-system
Solution
Presets system based on C#-plain class and ScriptableObject as Containers
I. ScriptableObject-based preset can be shared between multiplie AS and contexts
II. preset can be applied at runtime with Preset.Apply(AudioSource)
Summary
- package
- Ready-to-use MonoBehavior - AudioSourceSettings
- small API to customize behaviour
- Presets can be ScriptableObjects or plain C# class in your code
- create preset with ProjectWindow/RMB/Create/Audio/AudioSourceData container