12. Scene integration
12.1 Components
| Component | Role | Main fields |
|---|---|---|
GameSetup | complete bootstrap | _graphPath, _autoStartDialogue, _languageOverride, _createOverlayFallback, _enableLogs, _validateOnLoad, _enableSimd, _logSimdArchitecture |
DialogueBridge | facade/events | _graphPath, _language, _autoStartOnAwake, _logEvents, _logEveryLine, _validateOnLoad |
DialogueUICanvas | TextMeshPro UI | _panel, _speakerText, _dialogueText, _choicesContainer, _choiceButtonTemplate, _continueButton, _hideOnEnd, _typewriterDelay, _continueKey, _advanceOnClick |
DialogueOverlayUI | fallback IMGUI UI | _visible, _fontSize, _panelHeight, _margin, _continueKey, _clickToContinue, _hideOnEnd |
In the absence of GameSetup, DialogueBridge initializes itself and starts the dialogue (Auto start dialogue). In the presence of GameSetup, the start is managed by the component: no double starts occur.
12.2 Manual start, without components
Example
var go = new GameObject("Dialogue");
var bridge = go.AddComponent<DialogueBridge>();
await bridge.InitializeAsync(); // on mobile
bridge.StartDialogue();