Modal Window Node
Overview
The Modal Window Node instantiates a UI prefab over the dialogue — a popup window that takes full focus until the player dismisses it. While the modal is open, the Dialogue UI is hidden to prevent overlap. Once the player confirms (via the standard Continue input), the modal fades out, is destroyed, and the dialogue graph advances.
It is designed for moments where you need to show the player structured information mid-conversation — quest summaries, item descriptions, map callouts, tutorial prompts, or any custom UI panel — before the dialogue continues.

Ports
Previous
Input
Multi
Receives connections from any preceding node.
Next
Output
Single
Advances to the next node after the modal has been dismissed and fully faded out.
Node Properties
Modal Window Prefab
GameObject
The UI prefab to instantiate when this node executes. Must be a prefab — scene objects are not accepted.
How It Works
At runtime, DialogueManager runs the following sequence when this node is reached:
The Dialogue UI is hidden — the
CanvasGroupalpha on theDialogueUIis set to0, clearing it from the screen.The modal prefab is instantiated as a child of the
DialogueManagerGameObject and moved to the last sibling position so it renders on top of everything else in the same canvas hierarchy.waitingForInputis set totrue— the graph is now blocked.The player presses Continue (the same input used to advance dialogue lines), which sets
waitingForInputtofalse.The modal window fades out over 0.3 seconds via its
CanvasGroupalpha (aCanvasGroupis added automatically if the prefab does not have one).The modal instance is destroyed.
The graph calls
AdvanceToNextNode()— the Dialogue UI is restored on the next node that displays text.
Validation
Modal Window Prefab not assigned
Error
No incoming connection
Warning
No outgoing connection
Warning
Prefab Requirements
The modal prefab has minimal technical requirements:
It should be a UI prefab (typically with a
Canvas,RectTransform, and child UI elements) to display correctly.A
CanvasGroupcomponent is recommended on the root for the fade-out effect. If one is not present, the system adds one automatically at runtime.The prefab is instantiated as a child of the
DialogueManagerGameObject — ensure your project's canvas setup allows UI children of a non-Canvas parent to render correctly, or include aCanvascomponent within the prefab itself set to Screen Space - Overlay.No special scripts are required on the prefab — dismissal is handled entirely by the dialogue system's Continue input.
Usage Tips
Quest accept screens — place a Modal Window Node immediately after a Quest Node (Start) to show the player a quest summary card before the NPC finishes speaking.
Item reward displays — trigger a modal showing an item tooltip or reward breakdown before the End Node, so the player clearly sees what they received.
Prefab is destroyed on dismiss — each time this node executes, a fresh instance is created and destroyed. There is no state persistence on the prefab between visits. If you need persistent state (e.g. a choice already made), manage it via Dialogue Variables.
Player input dismisses the modal — the same Continue button used to advance dialogue lines closes the modal. There is no separate close button built in — design your prefab's visual to make it clear to the player that pressing Continue will dismiss it, or include a visible "Press [X] to continue" label within the prefab.
Fade duration is fixed at 0.3 seconds — this is currently not configurable per node. If a sharp instant close is needed, ensure the prefab's initial
CanvasGroupalpha is1so the fade is visible and smooth.
Last updated