Forum Discussion
ivan_santiago_h
9 years agoExplorer
Access to Profile's Username
Hi there.
I am trying to access to the username of the user's profile, through OVRManager.profile.userName but it keeps returning an empty string.
Does or did anyone else have this issue? Do you know any other way to access to that information?
Many thanks in advance.
I am trying to access to the username of the user's profile, through OVRManager.profile.userName but it keeps returning an empty string.
Does or did anyone else have this issue? Do you know any other way to access to that information?
Many thanks in advance.
4 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionLet me see if someone here knows about this. Also, this should be in the Developer section of the forum. You can switch sections by clicking the drop-down menu on the top right.
- ivan_santiago_hExplorerOk, i got it work, was a different thing. But now, all I get is "Oculus User", not the proper username.
Thanks for your answer.
I will change the section right away. - delphinius81Rising StarYou can definitely retrieve it through the PlatformSDK through this call:
using Oculus.Platform;
using Oculus.Platform.Models;
Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback);
And the callback would look something like:private void GetLoggedInUserCallback(Message msg) {
if (!msg.IsError) {
User u = msg.GetUser();
mOculusUserHandle = u.OculusID;
}}This works whether the user is online or offline.
Just an alternative approach if you think you'll ever want to add other Oculus platform functionality to your game/app in the future anyway. - ivan_santiago_hExplorerThanks for the answer. I thought that I could take that information from the Unity Utilities.
I will download the PlatformSDK.
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
- 1 year ago
- 5 months ago
- 11 months ago
- 16 days ago