Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by wowemotions_company · Feb 27, 2015 at 07:16 PM · resolutionwindowsverticalportrait

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:

alt text

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?

2015-02-27-11-54-05.png (35.6 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image wowemotions_company · Mar 02, 2015 at 05:10 PM 0
Share

Perfect, thanks!

avatar image Sanky · Sep 27, 2017 at 09:52 AM 0
Share

Hi buddy,

I just found out the solution use default player settings in unity. And add this line into start function of any script. - Screen.SetResolution(1080,1920,true);

And just set your display resolution TO PORTRAIT $$anonymous$$ODE using display setting on windows. After that reopen unity and build it again.

Woola..! After you start your game you will see that your application in portrait mode.

5 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by Ippokratis · Feb 21, 2018 at 08:46 PM

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
     }

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ronnie_0 · Mar 01, 2018 at 03:14 AM 0
Share

This answer works best for me. The application doesn't start at the specified resolution, but as soon as the scene opens that contains that Awake function, the window size is adjusted.

avatar image Ippokratis Ronnie_0 · Mar 01, 2018 at 05:41 AM 0
Share

Yup, you place the script in the first scene of your app.

avatar image
1

Answer by awplays49 · Feb 27, 2015 at 07:58 PM

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 :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image awplays49 · Feb 27, 2015 at 07:59 PM 0
Share

And turn on full screen if you want it to be fixed!

avatar image
1

Answer by svendkiloo · Jan 16, 2017 at 12:26 PM

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).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by hexagonius · Feb 27, 2015 at 07:58 PM

Maybe by calling Screen.SetResolution

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by shacharoz · Apr 30, 2019 at 08:47 AM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity does not change the size of the window 0 Answers

Desktop resolution affects game performance 2 Answers

Standalone player - Customizing launcher - Supporting two languages 0 Answers

How to set resolution for android 0 Answers

Windows XP Vertical mode Stand Alone game wont work 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges