Runtime/Common/Audio¶
Lightweight audio helpers for samples and simple SFX playback.
This folder contains one minimal component, used by demos, basic scene setups, and one optional Pickups decorator.
It is intentionally:
- small in scope
- non-opinionated
- not a full audio system
AudioSFXChannel¶
AudioSFXChannel is a simple MonoBehaviour that exposes an AudioSource for SFX playback.
It does not:
- manage pooling
- handle prioritisation
- provide routing or mixing
- implement any audio system logic
It exists purely as a convenient scene-level reference for playing sounds in samples or lightweight setups.
Intended Usage¶
- Used by samples and teachable panels
- Suitable for basic SFX triggering
- Looked for by
SoundDecoratorin the Pickups system (see below)
One runtime system does look for it¶
SoundDecorator — a Pickups effect decorator — calls context.GetComponent<AudioSFXChannel>() after the effect it wraps succeeds, and plays its clip through the channel's AudioSource.
That is a compile-time reference from Runtime/Systems/Pickups into this folder, so this is not purely a samples-only layer. What it is not is a hard requirement:
- If the context GameObject has no
AudioSFXChannel, the decorator logs a warning and plays nothing. Nothing throws and no other effect is skipped. - Nothing else in the framework consults it.
So the practical rule is unchanged — if you have your own audio solution, do not attach this component and do not use SoundDecorator; call your own audio from your own decorator instead. But "runtime systems do not depend on this" would be untrue, and this page used to say it.
Important Notes¶
- This is not a framework system in its own right — there is no audio system here to configure
- Its only framework consumer is
SoundDecorator(Pickups), and that consumer degrades to a warning - Projects with existing audio solutions should ignore or replace this layer