cancel
Showing results for 
Search instead for 
Did you mean: 

Unity: GetLoggedInUser always returning Message.Data.ID = 0

JeffNik
MVP
MVP
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.



5 REPLIES 5

JeffNik
MVP
MVP
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.

HarisKap
Explorer

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

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
Not applicable

I second this question. Which service has to enabled for  GetLoggedInUser to return actual data?

Anonymous
Not applicable

Don't look in the platform services, you need to request access under data usage (different header, icon is a padlock with a small heart, third below platform services).