Oculus ID return 0 and Username is empty
Hello, We require to get the Display name and Username for unique identification of our devices as they are logged in with specific Oculus account. I have setup an account on Oculus developer dashboard as required as well as doing all the certifications and requirements > data use checkup. The code in the Game Manager class is as follows public bool InitOculus() { try { Core.Initialize(123****132); Users.GetLoggedInUser().OnComplete(LoggedInUser); } catch (UnityException e) { Debug.LogException(e); UnityEngine.Application.Quit(); } return true; } void LoggedInUser(Message msg) { string name = ""; string username = ""; if (msg.IsError) { Debug.LogError("Failed to retrieve Oculus user."); } else { User user = msg.GetUser(); ulong userId = user.ID; Debug.Log("USER ID IS " + userId); //ImageURL = user.ImageURL; username = user.OculusID; Users.Get(userId).OnComplete(message => { if (!message.IsError) { name = message.Data.DisplayName; } else { var e = message.GetError(); Debug.LogError($"Error loading display name: {e.Message}."); } }); } Debug.Log("Display Name " + name + " and the username is " + username); } I am posting here because there are some other posts regarding this issue but they are either too old to be valid or unanswered. Thank you in advance.541Views0likes0CommentsHow can I NOT Use Oculus?
I am building an app that is supposed to be released on the Vive, Rift, Windows MR, GearVR, Daydream and cardboard for iOS and Android. I.e. 3 different Android platforms... but as soon as I have the Oculus SDK installed in my project and build for Android the app demands that I insert my phone into the GearVR headset even though I have only "Daydream" and "None" selected as the XR options in Unity!!! :O Are we REALLY supposed to run Daydream apps inside of the GearVR headset? I think not. Yet, just HAVING the SDK in there so that we can change the supported devices in the XR settings and then build again.... that doesn't work. As long as the SDK is installed it will demand the use of the gear VR and thus it forces us to have duplicate projects and duplicate all our work across multiple projects just so we can have Oculus and non-Oculus versions of the app. What's the deal? How do I NOT require the GearVR for Daydream games? Why is it even demanding the GearVR when there is no support for Oculus added to the supported devices list in the XR settings tab? How do I build for Daydream with the Oculus SDK present in my project? Thanks881Views0likes1Comment