class
Sound
public static abstract sealed class Sound Single source for creating sounds
Properties
| Name | Type | Description |
|---|---|---|
Listener static | Transform | Sound listener of the active scene. |
MasterVolume static | Single | The user's preference for their master volume. |
DspNames static | String[] | Get a list of available DSP names |
VoiceSampleRate static | Int32 | The sample rate for voice data |
Methods
static Void SetEffect(String name, Single value, Single velocity = 10, Single fadeOut = -1) static Void Preload(String eventName) Precaches sound files associated with given sound event by name. This helps avoid stutters on first load of each sound file.
static Void UncompressVoiceData(Byte[] buffer, Memory<Int16>> ondata) static SoundHandle Play(String eventName, Single fadeInTime = 0) static SoundHandle Play(SoundEvent soundEvent, Single fadeInTime = 0) static SoundHandle Play(SoundEvent soundEvent, Vector3 position, Single fadeInTime = 0) Play a sound and set its position
static SoundHandle Play(String eventName, Vector3 position, Single fadeInTime = 0) Play a sound and set its position
static SoundHandle Play(String eventName, Mixer mixer) Play a sound and set its mixer
static SoundHandle PlayFile(SoundFile soundFile, Single volume, Single pitch, Single decibels, Single delay, Single fadeInTime = 0) static SoundHandle PlayFile(SoundFile soundFile, Single volume = 1, Single pitch = 1, Single delay = 0, Single fadeInTime = 0) static Void StopAll(Single fade)