UserInterface
High-level UI mode and base view id. Does not read Rewired/Unity input directly; UnityUserInterfaceAdapter + GnosisInputService navigation snapshots drive updates.
Adapter: UnityUserInterfaceAdapter.
State
Primarily in-memory fields on the service (_inputMode, _baseViewId), not a large Persistent subtree. Events carry payloads built with GnosisNode.
How it looks in persistent.json
None for UI mode / base view — those values are not written to persistent.json by this service. Adapters call SetInputMode / SetBaseView in C#; listeners observe FACT_USER_INTERFACE_* on the bus.
Events
String ids are in GnosisUserInterfaceEvents (Runtime/GnosisEngine/Source/Services/Persistent/Services/UserInterface/). C# exposes friendly constant names; the bus id strings are:
| Event id | When |
|---|---|
FACT_USER_INTERFACE_INPUT_MODE_CHANGED | Adapter reports new mode (e.g. gamepad, mouseKeyboard) |
FACT_USER_INTERFACE_BASE_VIEW_CHANGED | Root/base UI view id changes |
Functions
| Function | Parameters | Result |
|---|---|---|
GetInputMode | — | String value (wrapped as node) |
GetBaseViewId | — | String view id or empty |
Usage example — GetBaseViewId
private string ReadBaseViewId()
{
if (Context?.Store == null || Context.CallService == null)
return string.Empty;
var empty = GnosisNode.CreateObject(Context.Store);
var result = CallService("UserInterface", "GetBaseViewId", empty);
if (!result.Success || !result.Data.IsValid)
return string.Empty;
var n = result.Data;
if (n.Type == GnosisValueType.String)
return (string)n;
return string.Empty;
}C# API
SetInputMode, SetBaseView — called by the adapter; publish the facts above.
Statistics
None.