#[HDRP, 2022.3.62f2] Screen.SetResolution crashing or freezing (infinitely) the game

1 messages · Page 1 of 1 (latest)

sleek tangle
#

Hello,

I have an issue to change the game resolution in HDRP
I tried to write a post in unity's forums, but, I'm not sure people go in there ^^"

https://discussions.unity.com/t/windows-screen-setresolution-or-simply-alt-tab-the-game-focus-makes-it-crash/1695931

Basically, calling Screen.SetResolution might cause crashes or freezes

I'm using Unity 2022.3.62f2. And I managed to reproduce the issue in the HDRP sample project without changing its settings (apart from adding the scene I made).

--> Hence the following questions: Is it a known issue ? Is there any workaround ?

The simple script that reproduces the issue:
https://paste.mod.gg/ptotvlrcbkqk/0

plain dust
#

have you submitted a bug report?

sleek tangle
#

I tried to do it online (the Issue Tracker website) but, I haven't found how to add one :/

Since this is not an Editor bug (runtime only), I'm not sure how to submit one?
Do I use the same window as with Editor crashes?

plain dust
#

yes you use the editor window

sleek tangle
#

The report has been sent

#

(but I don't have permission to view it; even though I use the same email)

#

--

Other question: Is there a method we can use to ask Unity to open the game in a certain resolution the next time the application starts?
So that I don't actually call Screen.SetResolution, and everything could be setted before any HDRP frame

#

(I see some useful values in the regedit ("Computer\HKEY_CURRENT_USER\SOFTWARE\Company\ProductId"), but I wanted to know if we can actually use that, or use that with PlayerPrefs class, or if there might be side effects, or if a method to do it properly actually exist)

steady meadow