> 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.                                                                                                                |
