Portrait build on pc?

I’m creating a game for a vertical screen but I can’t build a portrait version for pc. I created the game using a second monitor with flipped desktop (using Ctrl+Alt+“Left arrow”) and the game window resolution set up in 720x1280 and everything went perfect, when I build and run it, all possible options for resolution are wide, I changed “Resolution and Presentation” for PC and set up the properties as showed in the image:

But still works on wide resolution when runs, even If I set “Display Resolution Dialog” to disabled to have only 720x1280.

Any ideas on how Can I make a 720x1280 build?

Try this one, tested, works.

 private void Awake()
    {
        //Set screen size for Standalone
#if UNITY_STANDALONE
        Screen.SetResolution(564, 960, false);
        Screen.fullScreen = false;
#endif
    }

Press Ctrl+Shift+B and click player settings. In the inspector, click resolution and presentation under the standalone tab. Turn off the launcher, turn off native resolution and type in the values of the screen size :slight_smile:

The answer given doesn’t work for me. However, if I do all those changes and also enable resizing and rung the app, it will still have the same landscape size I last chose from the launcher. If I now resize it to a portrait size and close it, and disable the resizing, it now continues to launch in this portrait format. Not sure if it’s something Windows is doing (I’m running Windows 10).

Maybe by calling Screen.SetResolution

Do you guys think it is possible to also set an aspect ration and not only the resolution?