Pepper.SFX
All Guidance pages

Guidance / Cookbook

Appendix: Quick Reference

Common Tasks Cheat Sheet

Play Sound:

myEvent.Post();
myEvent.Post(gameObject, transform.position);

Control Playback:

AudioHandle h = myEvent.Post();
h.SetVolumeScale(0.5f);
h.SetPitchOffset(2f);
h.Stop(1f);
h.Pause();
h.Resume();

Bus Volume:

AudioManager.Instance.SetBusVolume("Music", -6f, 1f);

State:

AudioManager.Instance.SetState("Underwater", 1.5f);

Switch:

AudioManager.Instance.SetSwitch("Surface_Type", "Metal");

RTPC:

AudioManager.Instance.SetRTPC("CombatIntensity", 0.75f);

Multi-Position:

AudioMultiHandle mh = myEvent.PostMultiPosition(emitterParent);
mh.SetVolumeScale(0.8f);
mh.SetVoiceVolumeScale(0, 0.5f);  // Per-emitter control
mh.Stop(2f);

From the Pepper.SFX 3.1 guides (USER_GUIDE.md). Something wrong or unclear? Tell me.