Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice
Dismiss Notice
Get hired in VR/AR: Unity partners with Udacity on Nanodegree program credentials to help you get hired! Read more on and get started on our blog here.

Resolved: How do I make use of the infinity display on Daydream view (with an s8/s8+)

Discussion in 'Daydream' started by Axirts, Oct 12, 2017.

  1. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
    I'm pretty new to Google's vr SDK and have just been playing around with the demos but one thing I can't seem to find is how to get my S8 to make use of the full (infinity) screen. Daydream home runs full screen, and I'm pretty sure the apps I've tried have been as well. I know for non vr apps (in android studio) I could just change the maximum resolution to 2:1 in gradle, but I've been avoiding changing the build system from unity's default. Am I missing a simple variable in a script somewhere? Any help in the right direction would be greatly appreciated.

    Thanks,
    Strix
     
  2. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    377
    Is this actually relevant to use in Daydream? You're only going to see what's visible through the lenses anyway. Is something actually not working correctly on the S8 because of this? (e.g. are you seeing black borders within the field of view in the headset because the screen is not being initialized with the wider aspect ratio that Samsung allows?)
     
  3. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
    It is easily testable by simply taking the phone out of the headset while my app is running. As you said, big black borders on either side in my test apps. It is full screen when I take it out in Daydream home. It noticeably limits the horizontal fov with the headset on.

    Edit: The app functionally works fine.
     
  4. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
  5. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
    First two pictures show Daydream home and native Youtube players. you can see how much (on either side) is lost to cropping. Sorry for the terrible quality.
     
  6. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    377
    But you are able to actually see those black areas from within the headset?
     
  7. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    377
    Also, it seems like if you really want to try this, then you don't necessarily need to use the Gradle build system. Just copy Unity's default AndroidManifest.xml out Unity's installation into your project's "Plugins/Android" folder, and then add
    <meta-data android:name="android.max_aspect" android:value="2.1" /> to the application element, or whatever you would have done normally.

    On a Mac you can copy from /Applications/Unity/Unity.app/PlaybackEngines/AndroidPlayer/Apk/AndroidManifest.xml. I don't know what the location is on Windows but you can go find it easily enough.

    EDIT: The only reason I kept asking instead of just saying this was because my fear would be that this would interfere with the way Unity's XR system has initialized the screen for stereo rendering, but who knows? I've never tried it so please let us all know how it goes.
     
    Last edited: Oct 12, 2017
  8. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
    I found the cropping noticeable with the headset on, yes.

    I tried adding it to the manifest in the plugins folder in Unity. That alone didn't fix it.

    I forgot Samsung has an "allow full screen" setting for individual apps in the system settings. Toggled that on for my app specifically and now it works. Just gotta find a way to do that automatically at launch if it detects a phone with that setting.

    Thank you for the help!

    Edit: I just tested it and even without the line in the manifest, by having the phone force it fullscreen, it makes use of the whole display.
     
    Last edited: Oct 12, 2017
  9. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    377
    What target sdk do you have selected in player settings?
     
  10. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
    I'm pretty sure the S8 maxes out at 24 (7.0) and conveniently that's the lowest for daydream view. So 24.
     
  11. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    377
    Yeah, but that's not a good solution for your customers. You want this to "just work" when they install your game. And at API 24, it *should*. So something is still wrong there.
     
  12. Axirts

    Axirts

    Joined:
    Jul 20, 2015
    Posts:
    7
    I know, as I mentioned before, I'll search for a way to automatically enable the setting the first time. I don't think Google's API should auto full screen apps in this case because it's software stuff unique to Samsung's latest flagships (and sort of applies to LG). The issue is that most other apps can just bring up a pop-up. But with daydream it's kind of awkward.

    I was checking again this morning and it seems that almost all 3rd party (non Samsung developed) daydream apps require manually enabling it. When I get home today I'll update this thread subject and add in anything I can find from Oculus's support pages. I figure the gear vr has to deal with the same thing but at a quick glance, there were surprisingly few threads anywhere discussing managing the Infinity display in code.