- Home /
Question by
Ninjarlz · Aug 20, 2018 at 12:16 PM ·
resolutionfullscreenoptions
Problem with SetResolution()
I am trying to implement settings menu in my game. I followed Bracekeys' tutorial regarding this topic, however I noticed strange behaviour concerning changing of resolution. Change of resolution via in-game options (different from native res) results in strange strips around the screen, even though the resolution has the same aspect ratio as the native one. Fullscreen mode is set to Fullscreen window. I would like to achieve similar effect to which is available in Display Resolution Dialog- view with lower resolution is streched so as to fill the whole area of the screen.
Here is implementation of Bracekey's approach:
public void SetResolution(int resolutionIndex)
{
Resolution resolution = _resolutions[resolutionIndex];
Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen);
}
Comment