Search Unity

How to get DeviceOrientation for rendering when Input.deviceOrientation == DeviceOrientation.FaceUp?

Discussion in 'iOS and tvOS' started by kyubuns, Mar 3, 2019.

  1. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    How to get DeviceOrientation for rendering when Input.deviceOrientation == DeviceOrientation.FaceUp?

    I'm using iPadPro for test.
    Put it on the desk, and launch my untiy app.
    I want to get screen orientation for rendering, but Input.deviceOrientation returns DeviceOrientation.FaceUp.
    I want one of these to return value.
    Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight
    How to get this?
     
    bordasgame likes this.
  2. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    Sorry, I solved this.
    I use Screen.orientation, not Input.deviceOrientation.
     
    bordasgame likes this.