How do I make it Vertical?

Hi,

I have just created a new Mobile 2D project. However, the camera view is shown horizontal.

May I ask how do I make it vertical?

6871844--802055--horizon.JPG

I tried googling this question, but doesn’t seems to get the right answer.

Thank you.

In the Game tab, click on the second menu from the left (it will be labeled with whatever your current screen aspect ratio is). Pick a different aspect ratio.

3 Likes

Thank you for your helpfulness but still there doesn’t seems to have any that will change my horizontal to vertical view.

Cameras in Unity don’t have a concept of vertical or horizontal orientation. They’re merely viewports into your game’s world. It’s the player that has a screen size with either a fixed or (in the case of mobile) rotating aspect ratio.

What Joe said is the best way to work. Set your Game view to a resolution/aspect ratio of your choosing. Your UI is another story… that can be set to a specific aspect ratio, but your cameras will not be.

1 Like

Ah, I didn’t realize it was you! I guess I tend to jump on questions about Unity’s UI because it’s one of the things I feel pretty confident in. With that said, I’m not sure what more I can tell you beyond what I’ve already responded in past posts of yours.

You can add a new setting to that menu using the + button at the bottom. Change the dropdown to Aspect Ratio and enter any values that give you a portrait ratio (width smaller than height).

For your canvas, set its Canvas Scaler Reference Resolution to something similar, except with this you have to give it a resolution. Use values that line up with the ratio you’ve set in the camera.

What, specifically, are you having trouble with here?

1 Like

There are 2 things which I still can’t figure out.

I’m doing 2D in mobile.

  1. I want my Canvas to rotate such that from top down view, I see that it is “vertical” instead of “horizontal”.
    I actually manage to do it initally when I create the x and Y axis. However I’m not sure what I did.

  2. It seems like my camera view is alway bigger than my canvas. Only when I set my canvas to “Screen space - Camera” Then, everything seems better. My canvas and screen are the same size.

Hope someone can help.

I’m going to try what you suggest here as well.

  • Set Game window to 9:16 ratio
  • Set Canvas to Overlay and Canvas Scaler to 1080x1920 reference resolution, Match Width or Height, Match to 0
  • Done
5 Likes