Skip to content

VixSettings UI Bindings

Namespace: VixSettings.UI

VixSettings includes simple uGUI binding components that synchronize UI controls with setting assets.

ToggleSettingBinding

Binds a UnityEngine.UI.Toggle to a BoolSetting.

Setup:

  1. Add ToggleSettingBinding to a GameObject.
  2. Assign the target Toggle.
  3. Assign a BoolSetting.

When the toggle changes, the setting is updated. When the setting changes, the toggle updates without sending another UI event.

SliderSettingBinding

Binds a UnityEngine.UI.Slider to a FloatSetting.

Typical use cases:

  • Volume
  • Sensitivity
  • Brightness-like scalar values

Binds a TMPro.TMP_Dropdown to a SettingBase<int>.

When the assigned setting is an EnumSetting, the binding can automatically populate the dropdown options from the setting's option list.

Use UI bindings for menu controls, and use setting appliers for project state changes.

Example:

  • SliderSettingBinding changes a FloatSetting.
  • MasterVolumeApplier listens to that same setting and applies the volume.

This keeps UI code separate from the code that applies settings to the game.