Forum Discussion
JeffNik
6 years agoMVP
Unity: GetLoggedInUser always returning Message.Data.ID = 0
In my Unity app (from within the editor), I'm trying to load my customized avatar for my main Oculus account. After I get a successful user entitlement check, I call the Users.GetLoggedInUser() function. The Message.Data.OculusID parameter correctly contains my account username, but the Message.Data.ID value is always 0 (zero) - so of course, my OVRAvatar instance wont load my customized avatar after setting the value provided to the avatar properties.
I have done this successfully in the past, and I believe the last time it worked correctly was before the Facebook account conversion. Has anyone else experienced this or might have suggestions as to how to fix it?
A few things I have checked/tried:
1. I have put the correct APP ID (from my Oculus Dashboard) in both the Platform and Avatar settings with the Unity/Oculus menus in the Unity editor
2. I am initializing with Core.Initialize()
3. I'm calling Request.RunCallbacks() to avoid a race condition
4. If I use OVRManager's account override option in the editor to use one of my test user accounts from the Oculus dashboard, it DOES return a non-zero ID number.
I'm at a loss at this point. Any suggestions would be appreciated.
I have done this successfully in the past, and I believe the last time it worked correctly was before the Facebook account conversion. Has anyone else experienced this or might have suggestions as to how to fix it?
A few things I have checked/tried:
1. I have put the correct APP ID (from my Oculus Dashboard) in both the Platform and Avatar settings with the Unity/Oculus menus in the Unity editor
2. I am initializing with Core.Initialize()
3. I'm calling Request.RunCallbacks() to avoid a race condition
4. If I use OVRManager's account override option in the editor to use one of my test user accounts from the Oculus dashboard, it DOES return a non-zero ID number.
I'm at a loss at this point. Any suggestions would be appreciated.
6 Replies
- For anyone interested... Oculus support was pretty quick in answering my question. Apparently, now, in the Oculus Dashboard, PER APP, you have to go to the API sub-menu and specifically request each platform feature - like obtaining user id and profile data, matchmaking, rooms functionality, etc. and GET APPROVED for access, which happened so quickly that I believe it was an automatic approval process.
- CNevanProtege
Hi there, I'm having a similar problem where whenever I try to get any User.ID it returns zero, including with GetLoggedInUser(). On my app dashboard I have Leaderboards, Achievements, and Events active, is there another one I need to activate before I can get User data? Thanks!
- Anonymous
I second this question. Which service has to enabled for GetLoggedInUser to return actual data?
- SkoutyExplorer
Thank you for the help! They should make this more clear in the Unreal Engine blueprint comments.
- HarisKapExplorer
Thank you very much helped a lot and worked. I am getting the oculus id, I am getting the profile image, but my displayName is empty. any idea why? Thank you
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago