Skip to main content
Shavier
Inspiring
February 17, 2023

Get the current user ID

Im trying to get the current user ID so I can share the spatial anchors, and I did this code:

var loggedUser = Oculus.Platform.Users.GetLoggedInUser();
textIP.text = loggedUser.ToString();

 

But somehow this gets an error and the user info does not display.

Is there another way to get the user id?

This topic has been closed for replies.

2 replies

New Participant
February 21, 2023

Well stop trying 

ChescoRed
Inspiring
February 28, 2023

 

_previousNameUserOculus = msg.GetUser().OculusID;

https://docs.unity.com/authentication/en/manual/SettingupOculusSignin 

 

VR Developer