Skip to content

Step 6 Custom Settings

BavGames edited this page Jul 6, 2026 · 3 revisions

Step 6: Your Own Settings (Blueprint-only)

A custom setting is one Data Asset plus one Blueprint event. No C++, no widget work - the menu builds the row for you.

1. Create the definition asset

  1. In your project content (e.g. Content/Settings/), right-click → Miscellaneous → Data Asset and pick a type:
    • OptiKit Setting - Bool - toggle row
    • OptiKit Setting - Float / - Int - slider row (range, step, display format)
    • OptiKit Setting - Option - left/right selector (values + localized labels)
    • OptiKit Setting - Trigger - action button
  2. Fill it in:
    • Setting Id: unique, Category.Name style - e.g. Game.ScreenShakeIntensity
    • Display Name / Description: what the row and the description panel show
    • Category Id / Category Label / sort orders: which tab it appears on
    • Applier Binding → Type = Delegate: routes the value to your Blueprint
  3. Add your folder to the scan list: Project Settings → Plugins → OptiKit → Definition Scan Paths → add /Game/Settings.
image

The row now appears in the menu, persists, and survives restarts. The shipped Video.FieldOfView, Ctrl.GamepadVibration, UI.CameraShake and Audio.SubtitleSize rows use exactly this pattern.

2. React to the value

In any long-lived Blueprint (GameInstance, player controller, manager actor):

  1. Get Game Instance → Get Subsystem (Ok Settings Subsystem)
  2. Get Delegate ApplierBind Event to On Setting Applied
  3. In the event, branch on Setting Id and use the value fields of the Ok Setting Value struct (bBoolValue, FloatValue, IntValue, OptionValue).
image

Values are (re)broadcast automatically at game start. If you bind later than that, call Replay Delegate Settings once after binding to catch up. Triggers work the same way through On Trigger Executed. Delegate values broadcast on Apply (or instantly with Autosave On Change), not while a slider is being dragged.

Wiring the shipped delegate rows

  • Video.FieldOfView - call the ready-made Set Player Camera Fov node (UOkMenuLibrary). 5.0's PlayerCameraManager.SetFOV is not Blueprint-callable, and the camera manager's Default FOV property is ignored while a camera component provides the view.
  • Ctrl.GamepadVibration - set the player controller's Force Feedback Enabled property from the bool.
  • UI.CameraShake - store FloatValue / 100 in a variable and feed it into the Scale pin wherever you play camera shakes.
  • Audio.SubtitleSize - resize your own subtitle widget from the option value.

Delete any of these rows if your game has no use for them (Step 3).

The demo map is the live example: its player controller binds the event in C++ and applies Video.FieldOfView to the camera (OkDemoActors.cpp).

3. Read values directly (optional)

For pull-style access, the subsystem offers Get Staged Bool/Float/Int/Option and Get Saved Value - useful when spawning things that need the current value once, without keeping a binding around.

Tips

  • Numeric rows: Display Fraction Digits and Value Format Text (e.g. {0}%) control the value text.
  • Edit Condition disables a row while another setting has (or lacks) a value.
  • Run Tools → OptiKit → Check Settings Catalog after adding assets; it flags duplicate ids and rows the theme cannot render.

Next: Step 7: Localization

Clone this wiki locally