- Home /
No resolution change in dual display mode
I have an app that displays render texture in fullscreen on the second monitor if the second monitor is available. Render Texture size is set to 1920x1080. I set the render texture in camera view (that has the target display set to Display 2) like that:
[ExecuteInEditMode]
public class ScreenBlit : MonoBehaviour {
public RenderTexture rndTexture;
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
if (rndTexture!=null)
Graphics.Blit(rndTexture, destination);
}
}
And I activate the second display like that:
public class DualDisplaySetup : MonoBehaviour
{
void Awake()
{
if (Display.displays.Length > 1)
{
Display.displays[1].Activate();
}
}
}
When I build my project and run the exe, the desired render texture is displayed on the second monitor but in resolution 1280x720. Since the second monitor resolution is 1920x1080, part of the screen is the desired display and the rest is black.
So smth like that:
I've tried changing the resolution using following methods:
Display.displays[1].Activate(1920, 1080, 60);
Display.displays[1].SetParams(1920, 1080, 0, 0);
Display.displays[1].SetRenderingResolution(1920,1080);
But it didn't work. I've tried displaying just the camera view and not the render texture and the result is the same. How can I display the camera view on the 2nd monitor in fullscreen with 2nd monitor resolution?
Your answer
Follow this Question
Related Questions
Windows: Multi Display with two different resolutions 2 Answers
WebGL build has degraded resolution on zoomed-in browsers or systems 0 Answers
UGUI Scaling across multiple monitors 0 Answers
Game window too small? 0 Answers
Maximize window mode and alt tab 0 Answers