-
Notifications
You must be signed in to change notification settings - Fork 0
Step 6 Custom Settings
A custom setting is one Data Asset plus one Blueprint event. No C++, no widget work - the menu builds the row for you.
- 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
-
- Fill it in:
-
Setting Id: unique,
Category.Namestyle - 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
-
Setting Id: unique,
- Add your folder to the scan list:
Project Settings → Plugins → OptiKit → Definition Scan Paths → add
/Game/Settings.
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.
In any long-lived Blueprint (GameInstance, player controller, manager actor):
Get Game Instance → Get Subsystem (Ok Settings Subsystem)-
Get Delegate Applier→ Bind Event to On Setting Applied - In the event, branch on
Setting Idand use the value fields of theOk Setting Valuestruct (bBoolValue,FloatValue,IntValue,OptionValue).
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.
-
Video.FieldOfView- call the ready-made Set Player Camera Fov node (UOkMenuLibrary). 5.0'sPlayerCameraManager.SetFOVis not Blueprint-callable, and the camera manager'sDefault FOVproperty 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- storeFloatValue / 100in 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).
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.
- Numeric rows:
Display Fraction DigitsandValue Format Text(e.g.{0}%) control the value text. -
Edit Conditiondisables 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