Avatar Creator (WebGL)
Integrate the Avatar Creator with you Unity WebGL project.
Last updated
Integrate the Avatar Creator with you Unity WebGL project.
Last updated
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.
This example has been tested in Unity 2020.3LTS and newer versions. See Troubleshooting if you encounter build errors.
Open the Unity Package Manager and find the Ready Player Me Core Package.
You can find the code samples on the package manager's right side. Find the WebGLSample and click Import.
When you first import the sample you should see a popup that offers to automatically import the custom WebGLTemplate and a WebGL helper library. We recommend clicking okay to simplify the setup process.
If you click Ok you and if it imports successfully you should notice that it added the following folders:
Assets/WebGLTemplates/RPMTemplate
Assets/Plugins/WebGlHelper
If for some reason the above folders do not exist you can manually import the RpmWebGLTemplate.unitypackage yourself. It is located in the project tab under Packages/Ready Player Me Core/Editor/WebView
Make sure you are building for WebGL and WegGLExample is included in the Build Settings.
Open Project Settings > Player > Settings for WebGL > Resolution and Presentation and select the RPMTemplate
Build and run the project. You should see a Create Avatar button
When you click Create Avatar Button it will launch the Avatar Creator
From here you can create an avatar, close the Avatar Creator
Once you finalize the avatar by clicking next you should see the Avatar Creator window close and the avatar will be loaded into the scene
If you have followed the installation steps correctly you should be able to select the RPMTemplate from the Project Settings window under Player/WebGL/Resolution and Presentation
.