Hello. I need to resize my game window to 1280x720 but with SteamVR it always resizes to 2160x1200. I read that SteamVR automatically started to adjust screen resolution and i think that game windows set it’s size accordingly. Can i force my game window to be desired size somehow? r.setRes and GameUserSettings->SetScreenResolution did not work. Also i tried to enable “Custom resolution” in SteamVR app. Can i somehow disable that feature or can i enable SteamVR plugin in runtime. Or is this problem with something else?
Note! I recently updated my engine to 4.23.1 from 4.20.3
same here with 4.23.0 (no problem with 4.21.2)
did you manage to find a solution?
I packed project with another engine on another computer (4.23.0)
the problem seems related to 4.23
triggering any resolution change after the VR system is up, will cause the main viewport to change its size according to HMD resolution.
the problem has been introduced with the following commit:
if (GEngine->XRSystem.IsValid() && GEngine->XRSystem->GetHMDDevice() && GEngine->XRSystem->GetHMDDevice()->GetHMDMonitorInfo(MonitorInfo))
{
- if (MonitorInfo.DesktopX > 0 || MonitorInfo.DesktopY > 0)
+ if (MonitorInfo.DesktopX > 0 || MonitorInfo.DesktopY > 0 || MonitorInfo.ResolutionX > 0 || MonitorInfo.ResolutionY > 0)
{
NewWindowSize.X = MonitorInfo.ResolutionX;
NewWindowSize.Y = MonitorInfo.ResolutionY;
adding those additional “or conditions” is resulting in a true “if clause” causing any resolution change to be overridden with the hmd screen resolution
reverting that commit we solved all our issues
we reported this to epic
Epic confirmed the issue and told us they will hopefully fix it in 4.24
Unreal Engine Issues and Bug Tracker (UE-81377)