My current work-from-home setup involves a laptop with a 4k super-high-DPI screen as a primary display, connected to a large 4k also-high-DPI secondary monitor which, for being 4x as large physically but with the same number of pixels, has a different display scaling setting at the OS level.
Whenever I drag a built Unity (~2019) app window from the laptop screen where it launches onto the secondary display, it effectively halves its size in each dimension. That wouldn’t be so bad, except that somehow the app latches the size change, and the next time I launch it, it defaults back to the laptop screen… but opens half as large.
Repeat this process a few times on an app built with a “fixed” default resolution (Resizable Window unchecked) and pretty soon I’m looking at a tiny little 240x135px window at 144DPI with no apparent way back.
Is there a way back, or are built apps permanently stuck at their last-used resolution unless built to be arbitrarily resizable?
Did you find a way to fix this? Can’t believe this is still an issue.
TFW you google an issue you know you’ve had in the past, and your own thread is the top hit and nobody knows the answer.
Fortunately, I just tracked down someone who does, god only knows from where.
tl;dr, it looks like every built windows Unity app writes its own garbageprefs directly to the Windows Registry. Bomb out Computer\HKEY_CURRENT_USER\Software\[CompanyName]\[ApplicationName]
and your player defaults are honored again. Probably for only 1 launch before it saves its state back to the registry.
1 Like