The PlaySettings class contains settings for playing sounds.
public struct PlaySettingsRemarks
See AudioComponent.PlaySoundOnComponent and AgentPrivate.PlaySound
Members at a glance
| Kind | Members |
|---|---|
| Fields | DontSync · Looped · Looping · Loudness · Offset · PitchShift · PlayOnce |
Fields
DontSync
public bool DontSyncfalse = we adjust the offset per Agent so that the sound is synchronized to everyone. This means late-joining Agents will hear sound at a greater offset. true = turn this off, let everyone hear sound from start / your offset
Remarks
The default value is false.
Looped
public static readonly PlaySettings LoopedThe default play parameters for looped sounds.
Looping
public bool Loopingfalse = play once, true = sound will loop.
Remarks
The default value is false.
Loudness
public float LoudnessLoudness in dB.
Remarks
Default is 0.
Offset
public float OffsetPlay from time offset (in seconds). Use DontSync if you want everyone to hear the sound from this offset regardless of when they join.
Remarks
The default is 0.
PitchShift
public float PitchShiftRelative pitch, in semitones. Changing a sound’s pitch also affects its duration. For example, if you raise the pitch by 12 semitones (an octave), it plays twice as quickly.
Remarks
The default is 0.
PlayOnce
public static readonly PlaySettings PlayOnceThe default play parameters for sounds that play once.
Used in examples
Generated from the Sansar 47.10.0 client ScriptApi snapshot.