Skip to main content

Importing an avatar

Importing the avatar as Humanoid​

By this point you should have already created you avatar and have an AvatarMetadata object.

To import it into your scene you need to use the AvatarImporter class. The avatar will be imported as a Humanoid, meaning that you can re-use your humanoid animations on it.

csharp
async void ImportAvatar()
{
// ...
GameObject avatarObject = await AvatarImporter.ImportAvatarAsHumanoid(avatar, animationController)
if(avatarObject == null)
Debug.LogError("Couldn't import the avatar");
// ...
}
csharp
async void ImportAvatar()
{
// ...
GameObject avatarObject = await AvatarImporter.ImportAvatarAsHumanoid(avatar, animationController)
if(avatarObject == null)
Debug.LogError("Couldn't import the avatar");
// ...
}