How To Create 3D Characters For Your Unity Game With Our Avatar SDK
Tags: unity3d, gamedev, tutorial, showdev
Published: 2021-04-19 10:03:39

## Make a game with 3D avatars using the free Ready Player Me Unity Avatar SDK

Ready Player Me is more than a 3D character creator – it's a cross-game avatar platform that lets you add personal avatars to any app and game. All it takes for the user to create their avatar is to take a selfie and customize it to their liking. Ready Player Me is already compatible with VRChat, LIV, Mozilla Hubs, 700 more official partners, and many smaller developers using our [Unity Avatar SDK](https://readyplayer.me/dev/3d-human-creator).

Implementing Ready Player Me 3D avatars is simple. Usually, it takes just one to two days for most of our partners to integrate our avatar creator into their products.
In this guide, we are going to focus on our [Unity Avatar SDK](https://docs.readyplayer.me/integration-guides/unity). We will guide you through our avatars' import process, both inside the editor and at runtime.

## Using Ready Player Me avatars for commercial projects

Ready Player Me avatars are free to use. All avatars [created directly on our website](https://readyplayer.me/avatar) are under the Creative Commons 4.0 license, which means that they can be used for non-commercial projects as long as Ready Player Me is credited.

If you’re looking to integrate Ready Player Me avatars into your commercial app or game, you can continue using our avatars for your project for free as a registered Partner. To become a Ready Player Me Partner, [follow the steps here](https://readyplayer.me/become-a-partner).

## Requirements

For the Ready Player Me Unity package to work properly, you'll need:

Unity 2018LTS and newer versions of the Unity3D game engine
A valid avatar URL created from Ready Player Me to import an avatar into a Unity scene

For iOS builds, the `Microphone Usage Description` field in `Player Settings` must be filled with an appropriate message. The `VoiceHandler` component requires microphone permission. If this area is not filled, the build will fail. To build without microphone permission, remove this script.

## Dependencies

Dependencies are already included in the Ready Player Me `.unitypackage` file. If you are using an older or a newer version of these dependencies, please backup your project before making changes.

- GLTFUtility - 0.6
- Newtonsoft JSON - 12.0.1.22727

## Getting started with the Ready Player Me Unity Avatar SDK

If you worked with Unity before, then the Unity package's import process should be easy for you. Here's how it goes:

1. Download the latest version of the Ready Player Me Unity package from our [releases page](https://docs.readyplayer.me/integration-guides/unity/unity-sdk-download)
2. Open the Unity project you want to use
3. Import the package from the top Unity Editor toolbar via `Assets > Import Package > Custom Package`
4. Select the Ready Player Me Unity package from file explorer and import it. A window will pop up, hit "OK" to start importing the package into your project.

You can also import a Unity package by dragging and dropping it into the Project tab in the Unity window.

## How to use the Ready Player Me Unity Avatar SDK

To launch the Ready Player Me Unity Avatar SDK editor window within Unity, select `ReadyPlayerMe` in the `Avatar Loader` menu.

![Ready Player Me Unity 3D Avatar SDK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/893u2bnooalhldkg91ro.png)

To create and save your avatar in editor time, paste your avatar URL from the [Ready Player Me website](https://readyplayer.me/) and click on the "Load Avatar" button.

To load an avatar during playtime, create an instance of `AvatarLoader` and call `LoadAvatar` the method from the instance with the URL of the avatar to load.

```
private void LoadAvatar()
{
    AvatarLoader avatarLoader = new AvatarLoader();
    avatarLoader.LoadAvatar(avatarUrl, AvatarLoadedCallback);
}

private void AvatarLoadedCallback(GameObject avatar)
{
    Debug.Log("Avatar Loaded!");
}
```

This operation will download and load the avatar model to the scene. You can get access to the avatar game object in the scene via a callback method.

## API documentation for Ready Player Me Unity Avatars

Here are classes that you can call within Ready Player Me Avatar SDK. As we said before, it's fairly simple!

- `AvatarLoader` – the main class used for loading and downloading avatar models and configures the output
- `public void LoadAvatar(string url, Action<GameObject> callback = null)` – initiates avatar download and import operations
- `public int Timeout` – the timeout value for avatar download request
- `public bool UseModelCaching` – used for caching downloaded models by their GUID. If enabled, models will be loaded from users local instead of being downloaded again

**Important** – making a new avatar will not give you a new GUID. It will update your avatar on the same URL instead. Use caching if you are sure that you will not update your avatar. Otherwise, the old avatar will be loaded.

## Loading Mixamo Animations for the Ready Player Me Unity avatars

Full-body Ready Player Me avatars are compatible with Adobe's Mixamo animations. Here's what you have to do to use the animations with our avatars:

**Step 1**: Go to [Mixamo's website](https://www.mixamo.com/#/) and sign up or log in

**Step 2**: Upload either `FemaleAnimationTarget` or `MaleAnimationTarget` from `Assets/Plugins/Wolf3D ReadyPlayerMe SDK/Resources/AnimationTargets` to Mixamo.

You can find this folder by clicking on the `Reveal Animation Targets Folder` button on the editor window.

![Ready Player Me Adobe Mixamo Animation Upload Character](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atus4ql6vf800a5e6wy6.png)

**Step 3**: After Mixamo completes processing the animation target, pick an animation that you want to use. Then click "Download."

![Ready Player Me Adobe Mixamo Download Animation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gntkroj49wnwm2en0byx.png)

**Step 4**: When the download settings dialogue shows up, select `FBX for Unity` format and skin as `Without Skin`. Finally, click "Download."

![Ready Player Me Adobe Mixamo Download Animation Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xbymiqyo5lardkjshzrr.png)

**Step 5**: Move the downloaded animation into your Unity project by drag it into a female or male Animator Controller.

---

That's all you have to know to get started with Ready Player Me Unity Avatar SDK. For more, including our Unreal SDK, check our [developer documentation](https://docs.readyplayer.me/). Feel free to join our [Discord server](https://discord.gg/AKhfvr6QmY) and chat with our team on the #dev-unity channel.

If you would like to use Ready Player Me for a commercial product, [reach out to our team](mailto:info@wolf3d.io).