Sound
๐ How to create a Sound
Soundnew Sound("Jump").Play();new Sound(SFX.Jump).Play();Sound jumpSound = new Sound("Jump")
.SetVolume(0.8f)
.SetLoop(true);
jumpSound.Play();๐ Advanced example
Sound laser = new Sound(SFX.Laser)
.SetVolume(0.5f)
.SetRandomPitch()
.SetHearDistance(5, 30)
.SetOutput(Output.SFX)
.OnComplete(() => Debug.Log("Laser reloaded"))
.Play();Last updated