> For the complete documentation index, see [llms.txt](https://docs.msquared.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.msquared.io/creation/unreal-development/features-and-tutorials/avatars/using-an-avatar-in-game.md).

# Using an Avatar in-game

This page outlines details on how to use these avatar Urls in-game, via the `CharacterAssetComponent`.

The `CharacterAssetComponent` is found on your morpheus actor (added by default for children of `M2M_CharacterBase`)

## How To Set Your Url

To apply your avatar Url, you can use one of the following:

### Directly Setting your Url

The `CharacterAssetComponent` has a `LoadCharacterFromUrl` function, which allows you to apply your Url.

{% hint style="info" %}
This function must be called on the *authoritative client*, so that it gets replicated to other users.
{% endhint %}

<figure><img src="/files/ihuEVzl8LyHf3VZ30xy6" alt=""><figcaption></figcaption></figure>

### The Default MML Url

If you want all characters to default to a specific Url, paste the Url into the `DefaultMmlCharacterUrl` field of your Morpheus Actor's `CharacterAssetComponent`:

<figure><img src="/files/mM3hlrXx45N1HH32aP6l" alt=""><figcaption></figcaption></figure>

### Multi-mesh avatar considerations

The main avatar GLB will be loaded onto the default Mesh component of your pawn actor. If your MML contains multiple GLB meshes (using child `<m-model>` nodes) then an additional `SkeletalMeshComponent` will be created for each sub-mesh.

If you want to make any tweaks to the player mesh after loading (for example disabling shadows) then you may need to iterate the child mesh components and make the change to each of them. Trigger this with the `M2M_CharacterAssetComponent::OnCharacterLoaded` delegate, which is called once all the components have been created.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.msquared.io/creation/unreal-development/features-and-tutorials/avatars/using-an-avatar-in-game.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
