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:
- Add
ToggleSettingBindingto a GameObject. - Assign the target
Toggle. - 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
DropdownSettingBinding¶
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.
Recommended Pattern¶
Use UI bindings for menu controls, and use setting appliers for project state changes.
Example:
SliderSettingBindingchanges aFloatSetting.MasterVolumeApplierlistens to that same setting and applies the volume.
This keeps UI code separate from the code that applies settings to the game.