Forum Discussion
ROBYER1
3 years agoExpert Protege
How to detect if a user doesn't have a Meta Avatar or if they have been assigned a default avatar?
I am working with the Meta Avatars SDK and can't find any way to detect if a user doesn't already have a Meta Avatar, and as part of this I can't find a way to detect if the user has simply been assigned a default avatar.
I have the ability to let the user open the customise avatar menu via a deeplink call, but no way to detect if I should tell the user to create an avatar first time if they don't have one?
- Found it in OVRAvatarEntity.cs/// True if the avatar has any avatar loaded other than the default avatar.public bool HasNonDefaultAvatar { get; private set; }Also I tried a suggestion of using the mirror ie.from the Oculus Avatar samples > mirror scene which gives me this error for a user who has no avatar, which is of no good as it actually causes issues in the build![ovrAvatar2 sampleAvatar] Unable to find user avatar with userId 4961820950580892. Falling back to local avatar.Checking hasNonDefaultAvatar from above worked though I had to check that value like 10-15 realtime seconds after avatar loading as it flagged wrong until the user's actual avatar has fully loaded as the loading callbacks fired early
1 Reply
Replies have been turned off for this discussion
- ROBYER1Expert ProtegeFound it in OVRAvatarEntity.cs/// True if the avatar has any avatar loaded other than the default avatar.public bool HasNonDefaultAvatar { get; private set; }Also I tried a suggestion of using the mirror ie.from the Oculus Avatar samples > mirror scene which gives me this error for a user who has no avatar, which is of no good as it actually causes issues in the build![ovrAvatar2 sampleAvatar] Unable to find user avatar with userId 4961820950580892. Falling back to local avatar.Checking hasNonDefaultAvatar from above worked though I had to check that value like 10-15 realtime seconds after avatar loading as it flagged wrong until the user's actual avatar has fully loaded as the loading callbacks fired early
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
- 10 months ago
- 11 years ago