Sansar Docs
Ask or search…
⌃K

PlaySettings

PlaySettings Struct

The PlaySettings class contains settings for playing sounds.

Syntax

[Sansar.Script.Interface] public struct PlaySettings

Member Details

DontSync Field

false = 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

Syntax

[Sansar.Script.Interface] public bool DontSync

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

Looped Field

The default play parameters for looped sounds.

Syntax

[Sansar.Script.Interface] public static readonly PlaySettings Looped

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

Looping Field

false = play once, true = sound will loop.

Syntax

[Sansar.Script.Interface] public bool Looping

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

Loudness Field

Loudness in dB.

Syntax

[Sansar.Script.Interface] public float Loudness

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

Offset Field

Play from time offset (in seconds). Use DontSync if you want everyone to hear the sound from this offset regardless of when they join.

Syntax

[Sansar.Script.Interface] public float Offset

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

PitchShift Field

Relative 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.

Syntax

[Sansar.Script.Interface] public float PitchShift

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0

PlayOnce Field

The default play parameters for sounds that play once.

Syntax

[Sansar.Script.Interface] public static readonly PlaySettings PlayOnce

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0