I try to get the user ID to set the oculus avatar. However the ID I get is always 0.
How to get the correct user ID
void Awake()
{
Debug.Log("---------------------------------");
text.text = "begin";
Oculus.Platform.Core.Initialize();
Oculus.Platform.Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback);
Oculus.Platform.Request.RunCallbacks(); //avoids race condition with OvrAvatar.cs Start().
}
private void GetLoggedInUserCallback(Message<User> message) {
if (!message.IsError) {
myAvatar.oculusUserID = message.Data.ID.ToString();
text.text = "no error id is: "+ myAvatar.oculusUserID;
Debug.Log("ID:");
Debug.Log("message.Data.ID.ToString()");
}
