> For the complete documentation index, see [llms.txt](https://enoch-app.gitbook.io/enoch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enoch-app.gitbook.io/enoch/api-references/unreal-engine-sdk/avatarobjectloader.md).

# AvatarObjectLoader

The AvatarLoader class is used for loading and downloading avatar models and configuring the output.Enochavatar**AvatarLoader** loads the avatar from the provided `url` and stores it in local storage. Used by Enochavatar**ActorComponent**.

### Public Functions <a href="#public-functions" id="public-functions"></a>

| Function                                                                                                                                                                                                                                                                       | Returns | Description                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `LoadAvatar( const FString& UrlShortcode, class U`Enochavatar`PlayerMeAvatarConfig* AvatarConfig,`USkeleton\* TargetSkeleton, const FglTFRuntimeSkeletalMeshConfig& SkeletalMeshConfig, `const FAvatarLoadCompleted& OnLoadCompleted, const FAvatarLoadFailed& OnLoadFailed);` | void    | Downloads the avatar asset from the `UrlShortcode`and saves it in local storage.                                                          |
| `CancelAvatarLoad();`                                                                                                                                                                                                                                                          | void    | Immediately cancels avatar loading. When the garbage collector is removing the AvatarLoader, avatar loading gets automatically cancelled. |

#### LoadAvatar() Parameters <a href="#loadavatar-parameters" id="loadavatar-parameters"></a>

| Parameter                                                | Description                                                                                                                                                                                        |
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| const FString& UrlShortcode                              | Avatar url or shortcode.                                                                                                                                                                           |
| UEnochavatarPlayerMeAvatarConfig\* AvatarConfig          | Config for loading avatar with custom configuration.                                                                                                                                               |
| USkeleton\* TargetSkeleton                               | Chose the skeleton that will be used for the loaded avatar. If not set, the default skeleton will be used.                                                                                         |
| const FglTFRuntimeSkeletalMeshConfig& SkeletalMeshConfig | glTFRuntime skeletal mesh config that will be used for loading the avatar.Important: This property should be changed only for very special cases as changing this property might break the avatar. |
| const FAvatarLoadCompleted& OnLoadCompleted              | Success callback. Called when the avatar asset is downloaded.                                                                                                                                      |
| const FAvatarLoadFailed& OnLoadFailed                    | Failure callback. If the avatar fails to load, the failure callback will be called.                                                                                                                |


---

# 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://enoch-app.gitbook.io/enoch/api-references/unreal-engine-sdk/avatarobjectloader.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.
