Piflyon
9 years agoExplorer
How to get FRIENDS names or IDs (Unity, plateform SDK on PC, C#) ? GetLoggedInUserFriends()
Hi,
(I'm french, please excuse my english. I Hope I'm in the right place, as google did not help me, and this forum search function does not allow to filter developper's forum only.)
I am already displaying highscores in a custom online leaderboard (name, score, level reached, etc...). in which I highlight the current player score.
I would like to also highlight user's friends scores. How to get these informations ?
What would be perfect is an either a string Array of friends' names (OculusID I think).
The documentation is totally useless about GetLoggedInUserFriends():
https://developer3.oculus.com/documentation/platform/latest/concepts/dg-presence/
So far, here is how I get user's name (took me hours to make it work, as there is no working example anywhere)(anywhere else but here now ;) ) :
===== code ====
I say it again : it's a custom online leaderboard, I don't use the Oculus'one (too complicated for my developper skills).
Thank you for your help.
Cédric.
(I'm french, please excuse my english. I Hope I'm in the right place, as google did not help me, and this forum search function does not allow to filter developper's forum only.)
I am already displaying highscores in a custom online leaderboard (name, score, level reached, etc...). in which I highlight the current player score.
I would like to also highlight user's friends scores. How to get these informations ?
What would be perfect is an either a string Array of friends' names (OculusID I think).
The documentation is totally useless about GetLoggedInUserFriends():
https://developer3.oculus.com/documentation/platform/latest/concepts/dg-presence/
So far, here is how I get user's name (took me hours to make it work, as there is no working example anywhere)(anywhere else but here now ;) ) :
===== code ====
void OculusAppelStore() {
Oculus.Platform.Core.Initialize ();
Oculus.Platform.Entitlements.IsUserEntitledToApplication ().OnComplete (OculusVerifDroits);
}
void OculusVerifDroits(Message _msg){
if (!_msg.IsError) {
Debug.Log ("Ok ");
Users.GetLoggedInUser ().OnComplete (OculusLoggedInUser);
} else {
Debug.Log ("Nope " + _msg);
}
}
void OculusLoggedInUser(Message _msg) {
if (!_msg.IsError) {
User u = _msg.GetUser ();
playerName = u.OculusID;
} else {
Debug.Log ("erreur loggedIn");
}
}
===== /code=====I say it again : it's a custom online leaderboard, I don't use the Oculus'one (too complicated for my developper skills).
Thank you for your help.
Cédric.