Getting my Oculus id (Username)
I'm trying to get my Oculus username (Unity, c#) so I can use it on my game, but unfortunately I'm getting an error message and I can't find a solution myself. My oculus works in the game,
The error message I get is:
I'm pretty sure I'm missing a step but I can't find it in the manuals.
This is what I did so far:
I imported using Oculus.Platform;
and then I tried:
I call:
Method in my class:
The error message I get is:
NullReferenceException: Object reference not set to an instance of an objectI'm pretty sure I'm missing a step but I can't find it in the manuals.
This is what I did so far:
I imported using Oculus.Platform;
and then I tried:
I call:
Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback);Method in my class:
void GetLoggedInUserCallback(Message<User> msg) { if (msg.IsError) { Debug.Log("ERROR: " + msg); return; }
Debug.Log(" I am " + msg.Data.OculusID); }
