Skip to Content

UnitySettingAdapter

Service: Setting (Setting)
Code: Runtime/GnosisEngine/Adapters/Unity/Setting/UnitySettingAdapter.cs (partial files by area)

Binds settings UI (sliders, toggles, dropdowns) to GnosisSettingService — reads keyed subsets via GetSettingValues and writes UpdateSetting patches. Language display and changes are coordinated with Persistent.configuration.availableLanguages (loaded by Configuration from Resources; see AvailableLanguagesConfigurationId in source).

Typical inspector wiring

  • CRT / vignette — Sliders; optional crtFilter reference for runtime CRT feature tuning.
  • Haptics — Toggle ↔ hapticsEnabled.
  • PC-only — Window mode, VSync, framerate cap dropdowns; tab / controls hidden on non-PC builds.
  • Language gridlanguageGridContainer + LanguageDisplayItem prefab; populated from available-languages configuration.
  • Version — Store Persistent.settings.version in JSON and bind with UIBindingHost (not wired on this adapter).

Lifecycle

  • OnServiceBoundInitializeFromService, refresh version.
  • OnEnable — Refreshes UI when the settings panel is shown (RefreshAllUI).

Tab switching between settings panels is intentionally not this adapter’s job; use a separate tab switcher component (see class summary in source).

See also

Last updated on