Can't Get User Name (App Lab)
I am developing an Oculus Quest app for release on the App Lab. Previously, I was able to get the player's user name just fine via Oculus.Platform.Users.GetLoggedInUser().OnComplete(getLoggedInUserComplete); but recently that stopped working and now the user name is just an empty/null string. Essentially, I can't display a user name above players' heads anymore. Below is the code I am using to retrieve the user name: void getLoggedInUserComplete(Message msg) { if (msg.IsError) { Debug.LogError("Could not get Oculus user name!"); } else { Debug.Log("GetLoggedInUser success! " + msg + "; message type: " + msg.Type); if (msg.Type == Message.MessageType.User_GetLoggedInUser) { Debug.Log("Oculus GetLoggedInUser success! Setting user name in game manager: " + msg.GetUser().OculusID); GameManager.Instance.SetUserName(msg.GetUser().OculusID); Debug.Log(msg.GetUser().DisplayName); Debug.Log(msg.GetUser().ID); Debug.Log(msg.GetUser().OculusID); Debug.Log(msg.GetUser().ToString()); GetLoggedInUser is successful, however the message that gets returned is empty. Here is what prints out into the debug log from the above code: Oculus Platform entitlement check passed! GetLoggedInUser success! Oculus.Platform.MessageWithUser: message type: User_GetLoggedInUser Oculus GetLoggedInUser success! Setting user name in game manager: 0 Oculus.Platform.Models.User As you can see, all of the information returned in the GetLoggedInUser message is empty. My app key is correct, the entitlement check passes, and it successfully gets the logged in user but with an empty return message. It did not used to be this way but recently it broke (without me changing any of the code). I'm stumped. How can this be fixed?Solved7.1KViews1like7Comments