Ready Player Me SDK Beginner

Ready Player Me is a cross-platform avatar system that lets users create personalized 3D avatars from a selfie or through a web-based editor. In this lesson, you will install the Unity SDK, configure your application, and load avatars at runtime.

Installing the SDK

The Ready Player Me Unity SDK is distributed via the Unity Package Manager using a Git URL. Open your Unity project and follow these steps:

  1. Open Package Manager

    Go to Window → Package Manager → + button → Add package from git URL.

  2. Add the SDK URL

    Paste the Ready Player Me Unity SDK Git URL and click Add. The package and its dependencies will be imported automatically.

  3. Configure your App ID

    Open Ready Player Me → Settings in the Unity menu bar. Enter your Application ID from the Ready Player Me developer dashboard.

C#
using ReadyPlayerMe.Core;

public class AvatarLoader : MonoBehaviour
{
    [SerializeField] private string avatarUrl;

    private async void Start()
    {
        var loader = new AvatarObjectLoader();
        loader.OnCompleted += (sender, args) =>
        {
            // Avatar loaded successfully
            args.Avatar.transform.SetParent(transform);
            Debug.Log("Avatar loaded!");
        };
        loader.OnFailed += (sender, args) =>
        {
            Debug.LogError($"Failed: {args.Message}");
        };
        loader.LoadAvatar(avatarUrl);
    }
}

Avatar Configuration

Ready Player Me avatars support several mesh and quality configurations:

SettingOptionsUse Case
Mesh LODHigh / Medium / LowBalance quality vs. performance
Texture Atlas256 / 512 / 1024Reduce draw calls with atlased textures
Morph TargetsNone / ARKit / OculusEnable blend shapes for lip sync and expressions
PoseA-Pose / T-PoseMatch your animation retargeting setup
Performance Tip: For mobile or WebGL builds, use Medium LOD with 512 texture atlas. For desktop or VR, use High LOD with 1024 textures and ARKit morph targets for full facial animation.

Handling Avatar Events

The SDK provides callbacks for loading progress, completion, and failure. Always implement error handling and loading indicators for a smooth user experience.

Caching Avatars

The SDK includes a built-in caching system that stores downloaded avatars locally. On subsequent loads, avatars are retrieved from the cache, significantly reducing load times. You can configure cache size and expiration in the SDK settings.