"There's no Looping field on SoundEvent"
▸ SYMPTOM
You search SoundEvent / the .sound JSON for a Looping field to make music or ambience repeat. It isn't there. Stock "loop" events look identical to one-shots in the .sound file.
▸ CAUSE
SoundEvent has NO Looping field (verified against Sandbox.Engine.xml). Install loop .sound files are byte-identical to non-loop ones in the event JSON.
Looping lives on the compiled .vsnd (SoundFile.LoadOptions.Loop), an editor-import concern, not on the event resource.
▸ FIX
Option A: editor import
Set loop on the sound file import / compiled vsnd options in the editor (the actual control surface). The engine field is SoundFile.LoadOptions.Loop; the exact UI label varies by editor build.
Option B: loop from code (zero editor step)
SoundHandle handle;
void StartLoop(string eventPath)
{
handle = Sound.Play(eventPath /*, worldPos */);
}
void TickLoop()
{
if (!handle.IsValid() || handle.Finished || !handle.IsPlaying)
handle = Sound.Play(eventPath /*, worldPos */);
}
void StopLoop(float fade = 0.25f)
{
if (handle.IsValid())
handle.Stop(fade);
}Keep the handle; re-trigger when finished. For ambient beds, pump this from a small component's OnUpdate under a unique per-object key.
Don't per-frame-retry a failed play forever: retry once after ~2s, then disable with one warn (invalid handle otherwise = one engine warning per frame). See also custom-sound-wont-play for name-form bugs vs missing assets.
▸ WHY IT WORKS
The event resource describes how to play a vsnd (volume, distance, mixer). Whether the underlying sample wraps is a property of the sound file compile, not the event. Code-side re-trigger mirrors that wrap without needing a Looping field on SoundEvent.
- Removed needs-verification hedge; loop control surface verified as SoundFile.LoadOptions.Loop.