https://github.com/mitay-walle/com.mitay-walle.audio-source-settings
Save AudioSource values to ScriptableObject or C#-object class. That allow to setup runtime-created AudioSources, Sync values in multiplie AudioSources from one place. Analogue to Presets, but for Runtime / AudioSource. Allow to create RingBuffer for AudioSource
https://github.com/mitay-walle/com.mitay-walle.audio-source-settings
audio unity upm-package
Last synced: 8 months ago
JSON representation
Save AudioSource values to ScriptableObject or C#-object class. That allow to setup runtime-created AudioSources, Sync values in multiplie AudioSources from one place. Analogue to Presets, but for Runtime / AudioSource. Allow to create RingBuffer for AudioSource
- Host: GitHub
- URL: https://github.com/mitay-walle/com.mitay-walle.audio-source-settings
- Owner: mitay-walle
- License: mit
- Created: 2021-08-23T02:12:06.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T07:30:55.000Z (over 3 years ago)
- Last Synced: 2025-01-10T17:52:40.144Z (9 months ago)
- Topics: audio, unity, upm-package
- Language: C#
- Homepage:
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](https://docs.unity3d.com/Manual/Presets.html) 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 syncor
- 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
- UPM 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