# Avatar Creator ( WebGL)

The Avatar Creator can be integrated into your WebGL Unity Project. This requires setting up the communication between the Avatar Creator and your Unity application.

{% hint style="info" %}
Download and open the sample Unity Project from GitHub.\
[**https://github.com/readyplayerme/Unity-WebGL-Example**](https://github.com/readyplayerme/Unity-WebGL-Example)
{% endhint %}

This sample project uses a custom WebGL template to embed the Ready Player Me character creator inside an application to seamlessly add avatars. Use this as a reference for adding Ready Player Me avatars to your Unity WebGL application.

{% hint style="info" %}
This example has been tested in Unity 2020.3LTS and newer versions.\
See [Troubleshooting ](broken://pages/-MkfWzPmvZVvSYyG8iqX)if you encounter build errors.&#x20;
{% endhint %}

## Running the project

1. Make sure you are building for WebGL and **Scenes/WebGLExample** is included in the Build Settings.
2. Open Project **Settings > Player > Settings for WebGL > Resolution and Presentation** and select the template for your version of Unity.
3. Build and run the project. You should see the Avatar Creator, be able to create an avatar, close the Avatar Creator, and see the avatar in the scene.&#x20;

### Using the template

{% hint style="info" %}
For Unity 2019 use the RPM\_2019 Template. For later versions, use the RPMTemplate.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enoch-app.gitbook.io/enoch/developers-integration-guide/unity-integration/code-examples/avatar-creator-webgl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
