SoundSettings#
How a Sound plays. Every setting has a working default, so an imported file plays as is.
public sealed record SoundSettingsMembers: Cooldown · EnvironmentSend · Group · Loop · MaxDistance · MaxInstances · MinDistance · PitchVarianceCents · Priority · Rolloff · RootNote · SpatialBlend · StartOffset · VolumeDb · VolumeVarianceDb
Cooldown#
public float Cooldown { get; init; }Minimum seconds between plays; a play sooner than that is skipped.
EnvironmentSend#
public float EnvironmentSend { get; init; }The share of the sound sent to the Environment bus (the scene's reverb), 0 to 1.
Group#
public SoundGroup Group { get; init; }Initial value: SoundGroup.Effects
The output group (volume setting, pause behaviour).
Loop#
public bool Loop { get; init; }Repeat until stopped, instead of playing once.
MaxDistance#
public float MaxDistance { get; init; }Initial value: 50
Silent beyond this distance of the camera (metres).
MaxInstances#
public int MaxInstances { get; init; }How many copies may play at once (0 is no limit); a new play replaces the oldest copy.
MinDistance#
public float MinDistance { get; init; }Initial value: 1
Full volume within this distance of the camera (metres).
PitchVarianceCents#
public float PitchVarianceCents { get; init; }Each play picks a random pitch within ± this many cents (100 is a semitone).
Priority#
public int Priority { get; init; }What survives when every voice is busy: lower priorities are replaced first.
Rolloff#
public SoundRolloff Rolloff { get; init; }Initial value: SoundRolloff.Inverse
RootNote#
[System.Text.Json.Serialization.JsonIgnore]
public Note RootNote { get; init; }Initial value: Note.Root
The note that plays the sample at its recorded pitch (C-4 by default).
SpatialBlend#
public float SpatialBlend { get; init; }Initial value: 1
0 plays flat (no distance, no pan); 1 is fully positioned. Only applies when played at a place or object.
StartOffset#
public float StartOffset { get; init; }Seconds into the sample where playback begins.
VolumeDb#
public float VolumeDb { get; init; }The Sound's own level in dB (0 plays the file as recorded).
VolumeVarianceDb#
public float VolumeVarianceDb { get; init; }Each play picks a random level within ± this many dB.
Related types#
Note · SoundGroup · SoundRolloff
Source#
- SoundAsset.cs