UKismetSystemLibrary::GetConvenientWindowedResolutions
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Queries the device for a list of windowed resolutions that fit comfortably within the current primary display.
Caveats & Gotchas
- • Returns false if the query fails; always check the return value before trusting Resolutions.
- • "Convenient" resolutions are computed relative to the current primary display size, so the list changes if the user has a different monitor than at last query.
- • Intended for populating a video-settings resolution dropdown, not for detecting the current resolution — use other viewport APIs for that.
Signature
static bool GetConvenientWindowedResolutions(TArray<FIntPoint>& Resolutions) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Resolutions | TArray<FIntPoint>& | Output array populated with windowed resolutions convenient for the current primary display size. | — |
Return Type
bool Example
Populate a windowed-mode resolution list C++
TArray<FIntPoint> Resolutions;
if (UKismetSystemLibrary::GetConvenientWindowedResolutions(Resolutions))
{
for (const FIntPoint& Res : Resolutions)
{
UE_LOG(LogTemp, Log, TEXT("%dx%d"), Res.X, Res.Y);
}
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?