- Home /
How to set a custom screen resolution, such as 1512 X 1080
Hello, I have a urgent problem.
I am in change with a project which will use a unique resolution----1512 X 1080.
But now I don't know how to set this resolution.
I have used "Screen.SetResolution(1512, 1080, true);". But the resolution restored to 1280 X 720.
Can you tell me how to set custom resolution of output?
Thanks.
Answer by Zen_Hap · Nov 26, 2016 at 11:54 AM
Use void FixedUpdate () { Screen.SetResolution(1512, 1080, true); }
This is one of the worst pieces of advice I've ever seen here.
Answer by Random username · Oct 15, 2012 at 03:49 PM
File>Build Settings>Player. You can set up a custom resolution in the Resolution tab there.
Answer by Eric5h5 · Oct 15, 2012 at 04:35 PM
If you're talking about full-screen, you can't use a screen resolution that doesn't exist on the user's computer. Non-standard custom sizes will only work in windowed mode, and only if they are smaller than the desktop resolution.
Hello, I set the default screen resolution to 1512 x 1080 in the player setting and disable the resolution dialogue box from the drop down. In this way, it seems work in the full-screen. But I want to run the application in the windowed mode in 1512 X 1080. But I cannot find 1512 X 1080 in the resolution dialogue. How can you set the custom resolution of windowed mode?
Is your screen size larger than 1512 X 1080? Otherwise I believe it will not let you use that custom resolution in windowed mode.
Answer by Wip3ou7 · Dec 07, 2016 at 09:29 AM
Display.SetRenderingResolution
public void SetRenderingResolution(int w, int h);
https://docs.unity3d.com/ScriptReference/Display.SetRenderingResolution.html