The Plugin supports Unreal Engine 4.25 or 4.26
A valid avatar URL created from Ready Player Me to import an avatar to an Unreal scene.
Loading an avatar into our demo scene is great but most likely you will want to know how it all works and more importantly how you can implement it into your games and other applications. To get started, let's open up the
BP_ReadyPlayerMeActor blueprint. Firstly, let's look at the first 3 nodes connected to the
BeginPlay node as shown below.
As the name suggests this runs as soon as you hit play and first we need to get a preconfigured runtime config using
RPM Get Full Body Runtime Config. This is a custom helper function to save you from having to create the config yourself. However, we will also cover how to do that later on in this guide. This config handles some of the loaded
.gltf scene scale and 3D transform properties.
Once we have the config we can pass it to the most important node of all
glTF Load Asset From Url. This node is part of the third-party Unreal editor plugin glTFRuntime. As you can see it is passed the public
Url property as a parameter as well as the
LoaderConfig parameter which we specifically need for ReadyPlayerMe avatars to load correctly for animation purposes.
Lastly, it has a
Completed callback function which we will use to actually load the avatar model assets into the scene.
OnAssetLoaded function below is connected to the
Completed callback function parameter mentioned above. This is run once the avatar has finished loading from the web and returns a custom type of asset called a
glTFRuntimeAsset which contains all the data loaded from the ReadyPlayerMe
Once the asset has been loaded we check whether the loaded asset is full-body or half-body avatar. If it's a half-body avatar then it just loads in with the helper function
RPM Setup Half Body Skeleton node. Alternatively, if it's full-body it loads the model with the
RPM Setup Fullbody Skeleton node. Both of these nodes handle the loading of all the meshes, materials, and skeleton and adding it to the
Target actor, which defaults to self if nothing is assigned.
Lastly, after loading the full-body skeleton we set the avatar up for animation but setting the animation blueprint with
RPM Set Full Body Animation Blueprint. This is another helper function and it takes in the public property
AnimBlueprintInstance which can be set in the inspector of the actor.
If you want to see exactly what our RPM helper functions do you can find the C++ class files in
If you would like to understand the avatar loading function logic further in blueprint format there is also a
BP_ManualExampleActor you can reference. In this event graph, you will see how the logic behind our ReadyPlayerMeFunctionLibrary helper functions can be applied manually via the Blueprint system.