Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Input.deviceOrientation and Screen.orientation not returning expected values in Editor / Simulator

Discussion in 'Editor & General Support' started by edee1337, Jul 11, 2019.

  1. edee1337

    edee1337

    Joined:
    Apr 10, 2013
    Posts:
    34
    Hello!

    Kinda confused on this one and can't seem to find an answer through search or in the docs. In the Editor I have the Simulator's orientation set to Landscape (in this case, for iPhone X). When I press play and check at runtime the return value of Input.deviceOrientation, it's "unknown" and Screen.orientation is "portrait".

    Is this expected behavior? I would think that at least Screen.orientation would return Landscape.

    Thank you for the help!
     
    amcakebread and Xarbrough like this.
  2. amcakebread

    amcakebread

    Joined:
    Nov 8, 2016
    Posts:
    28
    it would be nice to get an answer to this
     
  3. ocram99ful

    ocram99ful

    Joined:
    Aug 2, 2013
    Posts:
    1
    Hey i know its been 6 years but did you find the answer? :D
     
  4. Kagedmonkey40

    Kagedmonkey40

    Joined:
    Feb 2, 2016
    Posts:
    6
    Wow! I'm encountering this issue and can't believe noone has a solution for this...Sad.