AplosSettingsManager
AplosSettingsManager discovers [DebugGroup] components and their [DebugSetting] fields
across the scene, then saves, loads, previews, and resets those values through an
ISettingsStore. The manager itself is scanned as a
DebugGroup named "Console" (order 100).
Inheritance
object
↳ Object
↳ Component
↳ Behaviour
↳ MonoBehaviour
↳ AplosSettingsManager
Inherited Members:
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.Invoke(string, float)MonoBehaviour.InvokeRepeating(string, float, float)MonoBehaviour.CancelInvoke(string)MonoBehaviour.StartCoroutine(IEnumerator)MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()Behaviour.enabledComponent.gameObjectComponent.transformObject.name- …
Namespace: AplosConsole.Settings
Implements: ISettingsService
Properties
| Name | Data Type | Description |
|---|---|---|
Instance |
AplosSettingsManager |
Static singleton reference to the active settings manager. Assigned on Awake, read-only from outside the class. |
EnableColorSettingsScan |
bool |
Static, read-only hard toggle. When false, colour-based settings are excluded everywhere — neither persisted to the JSON file nor surfaced as editable options on the settings screen. |
IsProcessing |
bool |
true while a scan/load/save phase is running. Opt-in loggers watch this flag to suppress the routine scan/load/save messages. Read-only from outside the class. |
HasLoadedSettings |
bool |
true once settings have been successfully loaded from disk. Read-only from outside the class. Implements ISettingsService.HasLoadedSettings. |
SettingsStore |
ISettingsStore |
The backing store used to read and write the settings JSON. Defaults to a FileSettingsStore for the configured file name; settable to inject an alternative store. |
SuppressProcessLogs |
bool |
When true, hides the routine scan, load, and save log messages. Surfaced as a [DebugSetting] toggle. |
Events
| Name | Data Type | Description |
|---|---|---|
SettingsLoaded |
UnityEvent |
Raised after Load() successfully applies the saved settings. Also surfaced explicitly as ISettingsService.SettingsLoaded. |
Public methods
GetAllScannedGroups
Example
var groups = AplosSettingsManager.Instance.GetAllScannedGroups();
Description: Returns the collection of groups discovered by the most recent scan.
ApplySettingsTo
Parameters:
root(GameObject) — The freshly spawned object to apply the saved settings to.includeChildren(bool) — Whether to include inactive children when scanningrootfor[DebugGroup]components. Defaults totrue.
Example
AplosSettingsManager.Instance.ApplySettingsTo(newWindow.gameObject);
Description: Applies the persisted settings to a freshly spawned object (e.g. a runtime window) so it matches the saved palette immediately, without waiting for the next full scene rescan. Settings are keyed by group name, so every window that shares a [DebugGroup] ends up with identical styling. Implements ISettingsService.ApplySettingsTo.
RefreshGroups
Example
AplosSettingsManager.Instance.RefreshGroups();
Description: Re-scans the scene for [DebugGroup] objects and re-applies the saved values on top. Call this whenever the settings view is opened so newly-active groups are captured rather than relying on the one-off boot-time scan.
Save
Example
AplosSettingsManager.Instance.Save();
Description: Serializes all discovered [DebugSetting] field values and writes them to disk.
Load
Example
AplosSettingsManager.Instance.Load();
Description: Reads the JSON file and pushes matching values back into every live field. Groups or fields absent from the file keep their current values. Raises SettingsLoaded on success.
PreviewJson
Example
string json = AplosSettingsManager.Instance.PreviewJson();
Description: Returns the serialized JSON for the current field values without saving.
ResetAll
Example
AplosSettingsManager.Instance.ResetAll();
Description: Resets every discovered [DebugSetting] field to the value it had when first scanned (the authored default), restored from the snapshot captured before any saved values were loaded.
ResetAllToDefaultsAndSave
Example
AplosSettingsManager.Instance.ResetAllToDefaultsAndSave();
Description: Full console reset: re-scans the scene, restores every field to its authored default, pushes those defaults into the live visuals, then persists them as the new saved configuration.