Skip to content

Audio

Lumina plays sound through two components, a source that emits and a listener that hears, plus a small scripting API for one-off sounds.

Add an Audio Source component to an entity to make it emit a sound. Its position in the world drives attenuation and (with a listener present) spatial panning.

PropertyDoes
Sound FileThe audio asset to play.
VolumeVolume multiplier (1.0 = full).
PitchPitch multiplier (1.0 = original).
Min DistanceDistance (m) at which the sound starts to attenuate.
Max DistanceDistance (m) beyond which it’s inaudible.
LoopingRestart automatically when it finishes.
Play On ReadyStart playing as soon as the entity is set up.

From a script, the source’s exposed fields are settable, Sound, Volume, Pitch, bLooping, and the distance falloff. Set bPlayOnReady so the sound starts when the entity is set up.

SAudioSourceComponent Source = Registry.Get<SAudioSourceComponent>(Entity);
Source.Volume = 0.5f;
Source.bLooping = true;

The Audio Listener component marks the “ears”. Sound is panned and attenuated relative to its world position. Put one on your camera or player. Without a listener, audio plays unattenuated.

Today the script-facing audio path is the Audio Source component. To play a sound from a script, give an entity a source, point its Sound at an audio asset, and set bPlayOnReady (or configure it in the editor).

SAudioSourceComponent Source = Registry.Emplace<SAudioSourceComponent>(Entity)!;
Source.Sound = Asset.Load<CAudioStream>("/Game/Content/Audio/Theme");
Source.bLooping = true;
Source.bPlayOnReady = true;

A standalone, fire-and-forget one-shot API is not yet exposed to C#.