Skip to content

Tutorial: Settings Menu

What you’ll build: a settings panel with a header, a scrollable body of grouped settings (Audio, Graphics, Controls), and a sticky footer with Cancel / Save buttons.

┌─────────────────────────────────────┐
│ Settings │ ← header
├─────────────────────────────────────┤
│ AUDIO ▲ │
│ Master volume ▓▓▓▓░░ │
│ Music volume ▓▓▓░░░ │
│ SFX volume ▓▓▓▓▓░ │
│ │
│ GRAPHICS │
│ Resolution [1920x1080 ▾] │ ← scrolls
│ Quality [High ▾] │
│ VSync [✓] │
│ │
│ CONTROLS ▼ │
│ Sensitivity ▓▓▓▓░░ │
├─────────────────────────────────────┤
│ [Cancel] [Save] │ ← sticky footer
└─────────────────────────────────────┘

What you’ll learn:

  • The header / scrollable body / sticky footer pattern
  • Grouping settings into sections with section headers
  • Two-column “label + control” rows using a sub-Grid
  • Mixing widgets (ProgressBar, Dropdown, Toggle) inside Row and Column containers
  • Each<T> to build sections from data

Build it

The Inspector setup mirrors the code structure:

  1. Outer GameObject with AutoLayout set to Column, WidthFill + HeightFill.
  2. Three children:
    • Header — Row, HeightHug, padding 16, with a Text and an X close button.
    • Body — Row, HeightFill, with AutoLayoutScrollView component added. Inside: a Column of section groups.
    • Footer — Row, HeightHug, padding 12, distribution End, with Cancel + Save buttons.

For each section: a Column with a section-label and rows for each setting. Each row is a Grid with two columns (auto 1f).

Code is the cleaner path for a settings menu — there’s a lot of repetition that Each<T> collapses neatly.

Try this next

Persist on Save. Bind each control’s OnValueChanged to a model object via Capture. On Save, write the model to PlayerPrefs or your own settings store.

Section collapse. Add a ^/▼ icon next to each section title; clicking toggles the section’s Visibility between Visible and Collapsed. The scrollable body re-flows automatically.

Search filter. Add an InputField above the scrollable body; on text change, hide rows whose label doesn’t match. Use .Visibility(...) to keep them in the tree but out of layout.

Tab bar. Replace the flat list of sections with a sidebar Column on the left (tabs) and the active section’s rows in the body. Toggle each section’s Visibility between Visible and Collapsed based on the selected tab.

See also

Docs for AutoLayout PRO v1.0.0 Changelog