04-04-2023 07:39 AM
Dear Devs,
My app has Rift and Quest support. I've created two applications in dashboard, one for Rift and one of Quest.
I've also pasted the app IDs in the Platform and Avatars Settings file in Unity.
Added a sample build to Rift application and Quest application and uploaded the build, added test users oculus email ID.
The same oculus email ID is being used for the login inside Unity as well.
I'm getting the blue default avatar instead of the user's avatar in the Rift Application.
Please let me know how to resolve this.
I've also added the Data Usage Checkup => Avatars, User Profile and User ID.
Please let me know if anybody has resolved this issue.
Solved! Go to Solution.
04-05-2023 03:37 AM
Hmmm. I admit that I could be wrong here, but I believe that you need to use the userid returned with "GetLoggedInUser" to pull the avatar data. I read the documentation to mean that you would use GetOrgScopedId to identify the user across UNRELATED applications across your organization - but I admit it's my interpretation. I know that I have never used that function, and I have tested an avatar-based application that ran on both Quest and Rift and never encountered your issue where it worked on one but not the other. But I'm just a hobbyist, not a pro and have never released an app. Let me know how it goes - I'm curious about it now.
Platform.Users.GetOrgScopedID()
This method returns an ID that can be used to identify this user across all applications in your organization. Please note that the OrgScopedID is not the same as the userID in an app.
04-04-2023 11:33 AM
Here are a few notes on the headaches I had getting avatars to work...
Make sure you are calling GetLoggedInUser from Awake, not Start, and using Request.RunCallbacks() at the end of Awake.
In the callback for GetLoggedInUser, apply the returned user id to your OvrAvatar component. At one point (I'm not certain this is required but try it out), I had to set the gameobject "enabled" flag to false on my LocalAvatar prefab, and after I applied the user id to it in the callback, I then enabled the gameobject.
Let me know if you need any additional details on these - hope they help ya.
04-04-2023 09:18 PM
Hi @JeffNik,
I'm sure I'm using the GetLoggedInUser from Awake() method.
I use GetOrgScopedID instead of GetUser since my avatars has to work on both Rift and Quest.
Your previous solution didn't helped to resolve.
I retreive _userId like this, OculusPlatformManager.Instance.DoGetOrgScopedID(_userId, result =>
{
gotOrgScopedId = true;
_userId = result.ID;
});
And try to retrieve avatar like this,
var hasAvatarRequest = OvrAvatarManager.Instance.UserHasAvatarAsync(_userId);
Here, I get Request Failed error. Any idea why this is happening?
ERROR: OvrAvatarManager.HasAvatarRequestResultCode.RequestFailed
04-05-2023 03:37 AM
Hmmm. I admit that I could be wrong here, but I believe that you need to use the userid returned with "GetLoggedInUser" to pull the avatar data. I read the documentation to mean that you would use GetOrgScopedId to identify the user across UNRELATED applications across your organization - but I admit it's my interpretation. I know that I have never used that function, and I have tested an avatar-based application that ran on both Quest and Rift and never encountered your issue where it worked on one but not the other. But I'm just a hobbyist, not a pro and have never released an app. Let me know how it goes - I'm curious about it now.
Platform.Users.GetOrgScopedID()
This method returns an ID that can be used to identify this user across all applications in your organization. Please note that the OrgScopedID is not the same as the userID in an app.
04-11-2023 10:54 PM
Great idea 💡
04-12-2023 02:32 AM
Thanks @JeffNik That worked for me!
04-12-2023 06:11 AM
Glad to hear it! 🙂
11-28-2023 01:29 PM
Hi @vivekrajagopal , @JeffNik
11-28-2023 03:59 PM
Hi @vivekrajagopal , @JeffNik
I'm having the same problem, but I can't solve it.
Could you tell me how to resolve this problem?
I have the apps registered and running well when I use MetaQuest.
But when I run the StandAlone application (Rift or UnityEditor) and then connect
with another user via Quest, the problem happens...
How to resolve this?
regards
11-28-2023 09:28 PM
Please use OrgScopedID instead of Oculus User ID.
public void DoGetOrgScopedID(ulong userID, Action<OrgScopedID> callback)
{
Users.GetOrgScopedID(_oculusUser.ID).OnComplete(result =>
{
if (result.IsError)
OnError(result.GetError());
else
{
ScopedID = result.Data.ID;
callback?.Invoke(result.Data);
}
});
}
Usage =>
DoGetOrgScopedID(OculusUserID);