Display Mode Library
Monitor discovery, display-mode query, refresh-rate, and display-mode application nodes.
Use this library for monitor-aware settings screens and Windows display-mode control.
Python examples use Unreal's reflected API names through the unreal module. Every input argument is passed explicitly, including revert_after_seconds, to match Unreal Python binding behavior.
Monitor Selection
Leave MonitorId empty to target the monitor currently used by the Unreal game window.
Failure Reporting
Public error-message pins were removed. When a setter or test node fails, it returns false and writes the reason to the Unreal log.
Get Monitors
Returns every active Windows monitor.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | TArray<FWNTMonitorInfo> for all active monitors. |
FWNTMonitorInfo fields:
MonitorIdNameCurrentResolutionCurrentRefreshRateNativeResolutionbIsPrimarybIsGameWindowMonitor
#include "RefreshRateFunctionLibrary.h"
const TArray<FWNTMonitorInfo> Monitors = URefreshRateFunctionLibrary::GetMonitors();import unreal
monitors = unreal.RefreshRateFunctionLibrary.get_monitors()Get Game Window Monitor
Returns the monitor used by the current Unreal game window.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | FWNTMonitorInfo for the game-window monitor. |
#include "RefreshRateFunctionLibrary.h"
const FWNTMonitorInfo MonitorInfo = URefreshRateFunctionLibrary::GetGameWindowMonitor();import unreal
monitor_info = unreal.RefreshRateFunctionLibrary.get_game_window_monitor()Get Display Mode
Returns the current display mode for one monitor.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | FWNTDisplayMode for the selected monitor. |
FWNTDisplayMode fields:
MonitorIdResolutionRefreshRatebIsValid
#include "RefreshRateFunctionLibrary.h"
const FWNTDisplayMode Mode = URefreshRateFunctionLibrary::GetCurrentDisplayMode(MonitorId);import unreal
mode = unreal.RefreshRateFunctionLibrary.get_current_display_mode(monitor_id)Test Display Mode
Tests whether Windows accepts a resolution and refresh rate without applying the mode.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Resolution | Input | Target resolution to test. |
RefreshRate | Input | Target refresh rate to test. |
Return Value | Output | True when Windows accepts the display mode. |
#include "RefreshRateFunctionLibrary.h"
const bool bSupported =
URefreshRateFunctionLibrary::TestDisplayMode(MonitorId, FIntPoint(2560, 1440), 144);import unreal
supported = unreal.RefreshRateFunctionLibrary.test_display_mode(
monitor_id,
unreal.IntPoint(2560, 1440),
144,
)Apply Display Mode
Applies a resolution and refresh rate to a monitor.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Resolution | Input | Target resolution to apply. |
RefreshRate | Input | Target refresh rate to apply. |
RevertAfterSeconds | Input | Reverts to the previous mode after this delay when greater than zero. |
Return Value | Output | True when the display mode was applied. |
#include "RefreshRateFunctionLibrary.h"
const bool bApplied =
URefreshRateFunctionLibrary::ApplyDisplayMode(MonitorId, FIntPoint(1920, 1080), 120, 10.0f);import unreal
applied = unreal.RefreshRateFunctionLibrary.apply_display_mode(
monitor_id,
unreal.IntPoint(1920, 1080),
120,
10.0,
)Get Native Resolution
Returns the Windows recommended resolution for a monitor.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | Recommended or native resolution. |
#include "RefreshRateFunctionLibrary.h"
const FIntPoint NativeResolution = URefreshRateFunctionLibrary::GetNativeResolution(MonitorId);import unreal
native_resolution = unreal.RefreshRateFunctionLibrary.get_native_resolution(monitor_id)Get Supported Display Modes
Returns the unique resolutions and unique refresh rates that Windows exposes in display settings for the selected monitor.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Resolutions | Output | TArray<FIntPoint> containing unique supported resolutions. |
RefreshRates | Output | TArray<int32> containing unique supported refresh rates in hertz. |
#include "RefreshRateFunctionLibrary.h"
TArray<FIntPoint> Resolutions;
TArray<int32> RefreshRates;
URefreshRateFunctionLibrary::GetSupportedDisplayModes(MonitorId, Resolutions, RefreshRates);import unreal
resolutions, refresh_rates = unreal.RefreshRateFunctionLibrary.get_supported_display_modes(monitor_id)Get Refresh Rate
Returns the current refresh rate for one monitor.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | Current refresh rate in hertz. |
#include "RefreshRateFunctionLibrary.h"
const int32 RefreshRate = URefreshRateFunctionLibrary::GetCurrentRefreshRate(MonitorId);import unreal
refresh_rate = unreal.RefreshRateFunctionLibrary.get_current_refresh_rate(monitor_id)Set Refresh Rate
Sets the refresh rate for one monitor while keeping its current resolution.
| Pin | Direction | Purpose |
|---|---|---|
NewRefreshRate | Input | Target refresh rate in hertz. |
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | True when the refresh-rate change succeeded. |
#include "RefreshRateFunctionLibrary.h"
const bool bChanged = URefreshRateFunctionLibrary::SetRefreshRate(144, MonitorId);import unreal
changed = unreal.RefreshRateFunctionLibrary.set_refresh_rate(144, monitor_id)Last updated on