Runtime settings API

Reference for IConvaiRuntimeSettingsService — read current settings, apply patches, react to changes, and reset to defaults from code.

IConvaiRuntimeSettingsService is the scripting layer beneath the built-in Settings Panel. Any script can read the current settings snapshot, apply patches atomically, subscribe to change events, and control which transcript modes are exposed — without the panel being present in the scene.

Access the service through ConvaiManager:

ConvaiManager.ActiveManager.TryGetRuntimeSettingsService(out var settings);

IConvaiRuntimeSettingsService

Member
Type
Description

Current

ConvaiRuntimeSettingsSnapshot

Immutable snapshot of all current settings values

SupportedTranscriptModes

IReadOnlyCollection<ConvaiTranscriptMode>

Transcript modes currently registered as available for selection

Changed

event Action<ConvaiRuntimeSettingsChanged>

Fired whenever any setting changes

Apply(ConvaiRuntimeSettingsPatch patch)

ConvaiRuntimeSettingsApplyResult

Apply one or more settings atomically. Fields left null in the patch remain unchanged

ResetToDefaults()

ConvaiRuntimeSettingsApplyResult

Reset all settings to project defaults

SetSupportedTranscriptModes(IReadOnlyCollection<ConvaiTranscriptMode> modes)

void

Replace the set of transcript modes available for selection. Used to restrict the modes the Settings Panel dropdown exposes

ConvaiRuntimeSettingsSnapshot

An immutable struct returned by Current and included in apply results and change events. All fields reflect the state at the moment the snapshot was produced.

Field
Type
Description

PlayerDisplayName

string

Current player display name shown in transcript bubbles

TranscriptEnabled

bool

Whether transcript UI is enabled

NotificationsEnabled

bool

Whether in-scene notification popups are enabled

PreferredMicrophoneDeviceId

string

Device ID of the preferred microphone input

TranscriptMode

ConvaiTranscriptMode

Current transcript display mode (Chat or Subtitle)

ConvaiRuntimeSettingsPatch

Passed to Apply(). Any field left null remains unchanged after apply.

Field
Type
Description

PlayerDisplayName

string

Set a new player display name. null = no change

TranscriptEnabled

bool?

Enable or disable the transcript UI. null = no change

NotificationsEnabled

bool?

Enable or disable notifications. null = no change

PreferredMicrophoneDeviceId

string

Set preferred microphone device ID. null = no change

TranscriptMode

ConvaiTranscriptMode?

Switch transcript display mode. null = no change

ConvaiRuntimeSettingsApplyResult

Returned by Apply() and ResetToDefaults().

Field
Type
Description

Success

bool

true if the apply operation succeeded

Snapshot

ConvaiRuntimeSettingsSnapshot

Resulting settings state after the apply

AppliedMask

ConvaiRuntimeSettingsChangeMask

Bitmask of which fields actually changed

ValidationMessage

string

Reason for failure when Success == false. Empty on success

ConvaiRuntimeSettingsChanged

The payload delivered to Changed subscribers.

Field
Type
Description

Previous

ConvaiRuntimeSettingsSnapshot

Settings state before the change

Current

ConvaiRuntimeSettingsSnapshot

Settings state after the change

Mask

ConvaiRuntimeSettingsChangeMask

Bitmask indicating which fields changed

ConvaiRuntimeSettingsChangeMask

A [Flags] enum used in AppliedMask and ConvaiRuntimeSettingsChanged.Mask. Compare with bitwise AND to detect specific changes.

Value
Description

None

No fields changed

PlayerDisplayName

Player display name changed

TranscriptEnabled

Transcript enabled state changed

NotificationsEnabled

Notifications enabled state changed

PreferredMicrophoneDeviceId

Microphone selection changed

TranscriptMode

Transcript mode changed

All

All fields

Transcript mode limitation in the panel

The Transcript Style dropdown in the Settings Panel exposes only the modes registered in SupportedTranscriptModes. By default, SettingsPanelPresenter initializes this to { ConvaiTranscriptMode.Chat } only.

To expose additional modes in the panel dropdown, call SetSupportedTranscriptModes() before the panel opens:

To switch to Subtitle mode bypassing the panel entirely, use Apply() directly:

See Chat and subtitle modes for full mode-switching details.

Usage examples

Read current settings

Apply a settings patch

React to settings changes

Analytics — track settings changes

A training platform logs when trainees change their microphone device for session quality analysis:

Troubleshooting

Symptom
Likely cause
Fix

Apply() returns Success == false

Validation failure

Check result.ValidationMessage for the reason

Changed event not firing

Not subscribed, or subscribed after settings changed

Subscribe in OnEnable before the session starts

ResetToDefaults() result not checked

Return value ignored

ResetToDefaults() returns ConvaiRuntimeSettingsApplyResult — check result.Success if the reset must be verified

Next steps

Settings panelChat and subtitle modes

Last updated

Was this helpful?