Description
A static service that initializes the dialogue UI at runtime. Reads prefab references and configuration from module settings, instantiates the prompt and chat system prefabs, resolves Canvas and View components, applies CanvasScaler settings, and applies the active theme.
Interface
Static Methods
| Name | Parameters | Return Type | Description |
|---|
| Initialize | ModuleSettings settings | void | Instantiates UI prefabs and configures Canvas and views. |
| GetContext | N/A | DialogueUiRuntimeContext | Returns the current runtime UI context (Canvas, views, theme). |
| ApplyTheme | IDialogueUiTheme theme | void | Applies a specific theme to all UI views. |
| RefreshTheme | N/A | void | Re-applies the current theme (useful after settings changes). |
| Clear | N/A | void | Destroys instantiated UI and clears the runtime context. |
DialogueUiRuntimeContext
The runtime context returned by GetContext() provides access to:
| Name | Type | Description |
|---|
| Canvas | Canvas | The root Canvas for all dialogue UI. |
| PanelView | DialoguePanelView | The main dialogue panel containing speech and options. |
| PromptView | DialoguePromptView | The interact prompt shown when targeting an NPC. |
| Theme | IDialogueUiTheme | The currently active theme. |