Avatar List Element
Last updated
Last updated
An anonymous or Ready Player Me user can have multiple avatars saved. You can show their list of avatars with the AvatarListElement
.
See User Management to learn how to create an account for the user.
The AvatarListElement
loads the list of avatars and displays each avatar as a UserAvatarElement
.
When the user clicks the Customize button on one of the UserAvatarElement
items, the UnityEvent
OnAvatarModify
gets fired. You can listen to this event in your AvatarCreator
script and load the new avatar with the given AvatarId
.
When the Delete button is clicked, the AvatarListElement
enables the DeleteAvatarElement
(see screenshot below). After the user confirms, it will send the delete request to the Ready Player Me API and fire an event that tells the AvatarListElement
to remove the avatar from the list.
You can customize the appearance of the panel and the scrollbar.
For the avatar list to show only avatars that are created with your application or game (they are related to your app-id/subdomain), set the AvatarListFilter
in the Inspector to Application
. Setting AvatarListFilter
to None
displays all the users's avatars. Note that this only applies to Ready Player Me users, as anonymous users cannot leave your application/domain.
The UserAvatarElement
Prefab shows a single avatar along with Customize and Delete buttons. You can modify the buttons and other UI aspects of this element.