Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How do I make my game look good in a portrait mode?

Discussion in 'UGUI & TextMesh Pro' started by Picaresque, Oct 3, 2023.

  1. Picaresque

    Picaresque

    Joined:
    May 8, 2021
    Posts:
    6
    Here's the idea of what I have


    The thing is that while it's clear to me how to make UI look good when changing from landscape mode to portrait mode, I do not get how to show the important parts of my game (which are not in the center of the screen, but on the right side of it) when switching from landscape to portrait mode.
     
  2. sildeflask

    sildeflask

    Joined:
    Aug 16, 2023
    Posts:
    329
    change the position of the camera using script

    or

    change to a different camera thats already pre positioned using script
     
  3. Picaresque

    Picaresque

    Joined:
    May 8, 2021
    Posts:
    6
    Thanks! Is there any event firing when the device orientation is changed?
     
  4. CodeRonnie

    CodeRonnie

    Joined:
    Oct 2, 2015
    Posts:
    528
    I answered this question on StackOverflow a while back when I was trying to get enough rep to upvote. :D

    https://stackoverflow.com/a/66392478/6402294

    Since the time of that answer, Unity has added an option to the Perspective camera to select the FOV axis, but I don't see a similar option for Orthographic cameras at first glance.
     
    Last edited: Oct 3, 2023