Search Unity

Logging in with gear VR

Discussion in 'AR/VR (XR) Discussion' started by McSwan, Apr 21, 2016.

  1. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    129
    Hi,

    We have a Gear VR app that requires the user to log in. At the moment I've hard coded the login. Is there a way to:
    1. Start a VR as a "Normal" App. ie a NON VR app.
    2. Then have them enter their username and password.
    3. Fire up the VR app once the user details have been entered.
     
  2. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    If you are releasing your app in the oculus store, then it will be started from within the VR environment. So, you wont be able to switch to non vr mode as it will disconnect the phone from the Headset.

    For my game, I also need to give the player a username. AFAIK there is no way to log into facebook from within the vr game (at least not a public way), however, it seems that there is a way to get the oculus username.

    I haven't tried this yet, but if you install the Oculus Utilities, you should be able to use the OVRProfile.username or OVRProfile.GetName()

    https://developer.oculus.com/doc/1.3.0-unity/class_o_v_r_profile.html
    also, this is old, but maybe works as well:
    http://rifty-business.blogspot.com/2014/11/unity-4-knowing-which-user-profile-is.html

    Hope that helps,
    Frank
     
  3. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    129
    HI,
    Thanks for your help. Our players have a paid, pre-existing accounts that they need to link to. The only way I can think of making this work is by writing a separate application to take the username and password, then writing an encrypted local file which is then read by the VR program. Once in the program they would then have to choose a User profile then, put an additional pin number in to prove who they are.

    Very messy.

    Maybe there is a way to link oculus accounts and our account together so they only need to enter their pin.