Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

U5.6 Native Cardboard VR: Possible to launch app in portrait orientation?

Discussion in 'AR/VR (XR) Discussion' started by OlafZ, Apr 3, 2017.

  1. OlafZ

    OlafZ

    Joined:
    Aug 3, 2016
    Posts:
    17
    We have a cardboard app that starts into a non-VR menu in portrait orientation. When the app goes into VR, we change the orientation and enable VR. With the external Google VR SDK this was possible. However, with native VR in Unity 5.6 set to Cardboard, the android app is forced (in the AndroidManifest) to start up in landscape left orientation. We can change the orientation after startup, but this still leaves the ugly screen rotation animation when starting up and the splash screen is rotated as well.

    Is there any way to force a Native VR Cardboard app to start in portrait orientation?
     
    ted537 and noemis like this.
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,181
  3. Adamcbrz

    Adamcbrz

    Joined:
    Jul 13, 2011
    Posts:
    21
    Can you just export the project to Android Studio and change the manifest your self?
     
  4. OlafZ

    OlafZ

    Joined:
    Aug 3, 2016
    Posts:
    17
    Due to our setup, we unfortunately cannot change the apk after Unity builds it. We still need some solution to this issue.
     
  5. Bibzball

    Bibzball

    Joined:
    Sep 26, 2015
    Posts:
    21
    I second this issue. Pretty similar setup : Portrait menu into VR Mode.
    I have to do hacky stuff to force orientations how I want them.
     
  6. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    170
    Me too. In Cardboard iOS there appears no way to do this. Crazy

    Start in portrait, then switch to landscape for VR mode
     
  7. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    41
    Same here: nearly all our cardboard apps start in portrait mode and switch later to VR Mode (and back). So the main questions seem to be:

    1. Why does the checkbox "virtual reality supported" overrides the settings for device orientation? After enabling this checkbox you can add "none" and "cardboard" - which already shows, that Unity thougt about this case, but it seems not long enough... it would be much less anoying, if an app shows the splash always in portrait and switch later to landscape, after first VR sdk is loaded and enabled. At least: just let developer their options!

    2. If cardboad sdk is loaded and activated, the cross appears in the upper left corner. By pressing this, the app closes automatically. Again: why? Should't developer decide, what happens if user interact? I don't want to close, I just want to disable the vrmode and show 2D Menü again.

    Hope we'll get some support.
     
  8. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    101
    Same here. We need to start in NoVR mode (portrait) then switch to VR. It used to work in 5.4 with google sdk.
     
  9. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    41
  10. LunarCats

    LunarCats

    Joined:
    Aug 22, 2016
    Posts:
    7
    Same issue for me, it seems that sadly the new version of Unity 5.6 brings some big limitations for VR developpers.
    I don't understand those choice.
     
  11. zaphodp3

    zaphodp3

    Joined:
    May 3, 2017
    Posts:
    1
    +1 to this feature request. I've been working on an AR app, with portrait orientation all through and mono mode (single eye). Unity 5.6 VR already doesn't quite support mono-mode, but I used this work-around for it. Not having a portrait option makes this worse, and feels like an unnecessary limitation.
     
  12. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    41
    The problems seem to be solved:

    In newer versions the orientation problem and back button behavior seem to work as expected. I tested 5.6.1p4 and my test app starts now in portrait, I then change orientation after a certain button is activated, load the cardboard sdk (which was in the player settings list below "none") and then enable the vr settings and it works. Also the back button works than like with the "Escape"-Keycode. And I'm back in portrait and just disable the vr settings.
     
  13. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,181
    Right, now we need access to the close-button, so that we can define what it triggers, right?
     
  14. DHein

    DHein

    Joined:
    Jan 26, 2016
    Posts:
    38
    The weird part about the player settings is that you can actually enable portrait mode startup if you disable VR support. After that you can simply turn on the VR support and the app regards the default orientation even though in the editor it says "This setting is overriden by Virtual Reality Support".
     
    Egil-Sandfeld likes this.
  15. Chefty

    Chefty

    Joined:
    Jun 17, 2015
    Posts:
    38
    Any update for a workaround since then ? I have the same issue.
    I got a half VR app. The first scene is on portrait orientation and second scene on landscape.
    Although, when I got back to first scene from the second one, it seems to be force to switch from portrait to landscape again.
    Player settings still warn about default orientation in VR mode in Unity 2018... It's quite annoying.
     
unityunity