Choose one display or span all displays
Choose Desktop Display Mode under Project Settings > Plugins > Desktop Game Window Toolkit > Startup:
| Mode | Window and render area |
|---|---|
| Selected Display (default) | One monitor, using the saved Display Id or the primary monitor. |
| All Displays | One window and render viewport covering the physical bounding rectangle of every connected monitor. |
All Displays lets objects move across monitors within one scene. Monitor positions can be negative. Gaps between monitors remain part of the rendered scene, but no screen shows those areas. More rendered pixels require more GPU memory and processing time.
Save a mode for the next launch
- Call Set Desktop Display Mode for Next Launch with Selected Display or All Displays.
- Treat
RestartRequiredas success and prompt the player to relaunch. - On failure, read Get Last Desktop Window Error immediately.
Get Display Mode for Next Launch reads the saved preference or project default. Get Desktop Display Mode reads the active host mode; it returns Selected Display when no host is active. Saving a preference does not change the running window.
Build a monitor selector
In Selected Display mode, call Get Available Displays on the Desktop Game Window Subsystem. Label options with Friendly Name and Size; keep each structure's Display Id for Apply. Do not pass a name or array index.
Position and Size use physical pixels. Check Primary rather than assuming the first entry is primary. Refresh Hz is monitor refresh rate, not game FPS.
- Refresh the array and verify the selected Display Id still exists.
- Call Select Display for Next Launch with that ID.
- Treat
RestartRequiredas success and prompt the player to relaunch. - On
InvalidDisplayorStorageFailure, show Get Last Desktop Window Error.
Reset Display to Primary for Next Launch clears the monitor preference. Neither select nor reset changes the display mode. All Displays ignores the monitor preference but retains it for a later switch to Selected Display.
Get Current Display identifies the monitor containing the active host's center, including in All Displays mode. It returns false if that point falls in a gap between monitors. Use Out Display only when the return is true; this node does not identify the mode or saved monitor preference.
Preferences live under %LOCALAPPDATA%/<ProjectName>/Saved/Config/DesktopGameToolkit/: DisplayMode.txt stores the mode and DisplaySelection.txt stores the monitor ID. A saved mode overrides the project default.
Handle monitor changes
Bind On Available Displays Changed to refresh options; unbind your widget handler when removed. Refresh again on Apply.
In Selected Display mode, a missing saved monitor falls back to primary; check Is Using Display Fallback. Disconnecting the active monitor triggers a safe-primary move attempt and requires restart.
In All Displays mode, monitor changes adjust the host to the new combined bounds and mark RestartRequired. The existing rendered frame scales to those bounds until relaunch restores the correct render resolution and aspect ratio.
The combined width and height must each stay within 16,384 physical pixels, including after a layout change. GPU or memory limits can require a smaller area. If the new All Displays area is invalid, unavailable, over this limit, or cannot be applied to the host, the plugin reports failure and closes the game. Read Get Last Desktop Window Error for the reason.
RestartRequired does not prove the host is active. Apply preferences, close the game, then start a fresh packaged or separate Standalone process. PIE cannot create a desktop host. For live positioning, use Set Desktop Window Rect.