This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Options Manager

The singleton options controller — merges option profiles into a live value map, applies values through their targets, persists them, and serves the active input profile.

The Options Manager is the runtime of the GS_Options system. It loads the project’s option profiles and presets, merges them into a live value map, pushes values through their apply targets, persists them, and notifies anything listening when a value changes.

It also holds the active Input Profile and serves it to Input Readers.

As a Manager, it is spawned by the Game Manager and participates in the standard startup sequence.

For usage guides and setup examples, see The Basics: GS_Core.

Options Manager component in the O3DE Inspector

 

Contents


Setup

  1. Create an entity. Attach the GS_OptionsManagerComponent.
  2. Assign your option profiles and any presets.
  3. Assign your Input Profile.
  4. Turn the entity into a prefab. Enter prefab edit mode, set the wrapper entity to Editor Only, and save.
  5. Delete the Options Manager entity from the level.
  6. In the Game Manager prefab, add the Options Manager .spawnable to the Startup Managers list.

Inspector Properties

PropertyTypeDescription
Option ProfilesassetsThe option catalogs to merge. Multiple profiles stack and merge by key.
Option PresetsassetsPreset value sets, surfaced by GetPresetNames and ApplyPreset.
Input ProfileassetThe active input binding profile, served to Input Readers.

Plus Headless and Logging Depth, inherited from the manager base.


Lifecycle

StageWhat happens
ActivateBegins loading the profile and preset assets.
OnSetupManagersWaits for those loads, builds the option map, seeds defaults, then overlays persisted values.
OnStartupCompleteSchedules ApplyAll — see below.
OnShutdownManagersSaves options.

Why apply is deferred

Applying everything at OnStartupComplete is too early. Managers finish starting up before the render pipeline and window are ready, so display and render-scale settings applied at that moment silently do not take effect.

The manager therefore applies after a short tick delay rather than immediately. Any apply target that touches the renderer or the window inherits this constraint — if you write one, it will be applied on that same delayed pass, not during startup.

This is also why the launch-time path exists: the settings that most need to be right before the window exists are handled by console commands at boot, and the deferred apply covers everything else.


API Reference

Request Bus: OptionsManagerRequestBus

Singleton bus — call via Broadcast.

Generic value access

MethodParametersReturnsDescription
SetOptionkey, OptionValuevoidApplies, persists and notifies. The single write path.
GetOptionkeyOptionValueCurrent value.
HasOptionkeyboolWhether the key exists in the merged catalog.
ResetToDefaultkeyvoidRestores the option’s authored default.
ResetAllToDefault—voidRestores every option.

Typed convenience

Script-friendly — no OptionValue object required.

MethodParametersReturns
SetOptionBoolkey, boolvoid
SetOptionFloatkey, doublevoid
SetOptionIntkey, s64void
SetOptionStringkey, stringvoid
GetOptionBoolkeybool
GetOptionFloatkeydouble
GetOptionIntkeys64
GetOptionStringkeystring

Catalog

MethodParametersReturnsDescription
GetAllOptionKeys—vector<string>Every key in the merged catalog.
GetOptionsByCategorycategoryvector<string>Keys in one category — how a menu builds its pages.
GetOptionDefinitionkeyOptionType*The option’s definition. Non-owning, C++ only.

Lifecycle and presets

MethodParametersReturnsDescription
ApplyAll—voidPushes every current value through its apply target.
SaveOptions—voidFlushes current values to the user registry.
GetPresetNames—vector<string>Loaded preset names.
ApplyPresetpresetNamevoidOverwrites matching options, then applies and persists.
GetActivePresetName—stringThe preset whose values all match, otherwise "Custom".

Input

MethodParametersReturnsDescription
GetActiveInputProfileinputNameinput profile assetThe active profile, requested by Input Readers on activation.

Notification Bus: OptionsManagerNotificationBus

EventParametersDescription
OnOptionChangedkey, OptionValueFired on every value change. Script-bindable, so UI and gameplay can react without polling.

Usage Examples

C++ — reading a setting

#include <GS_Core/GS_Options/GS_OptionsManagerBus.h>

float masterVolume = 1.0f;
GS_Core::OptionsManagerRequestBus::BroadcastResult(
    masterVolume,
    &GS_Core::OptionsManagerRequests::GetOptionFloat,
    "audio.master"
);

C++ — building a settings page

AZStd::vector<AZStd::string> keys;
GS_Core::OptionsManagerRequestBus::BroadcastResult(
    keys,
    &GS_Core::OptionsManagerRequests::GetOptionsByCategory,
    "Graphics"
);

// GetOptionDefinition gives you the display name, description and widget
// hint for each key, so a menu can build itself from the catalog.

Writing a value goes through SetOption or its typed forms, which apply, persist and notify in one call — a menu never has to apply or save separately.


See Also

For related systems:

For conceptual overviews and usage guides:


Get GS_Core

GS_Core — Explore this gem on the product page and add it to your project.