Component

Actor component for Enoch avatar avatars.EnochavatarPlayerMeComponent is an Actor component responsible for loading the avatar and visualizing it by setting its SkeletalMesh. It also provides functions for loading the avatar and loading a rendered image of the avatar. EnochavatarComponent internally uses EnochAvatarAvatarLoader for loading the avatar and EnochAvatarRenderLoader for rendering the avatar.The Actor containing this component must also contain a SkeletalMeshComponent.

Properties

Property

Type

Description

UrlShortcode

FString

The avatar URL or shortcode used to load the avatar from the web.

TargetSkeleton

USkeleton*

Chose the skeleton that will be used for the loaded avatar. If not set, the default skeleton will be used.

AvatarMetadata

FAvatarMetadata

Provides read-only information about the loaded avatar, such as the type, outfit, or gender.

AvatarConfig

UEnochavatarAvatarConfig*

Avatar configuration asset data. Used to load the avatar with the specific configs.If no config is set, the partner-specific configs will be used for loading the avatar.

SkeletalMeshComponent

USkeletalMeshComponent*

Skeletal mesh component used for setting the skeletal mesh of the loaded avatar. If not set, it will be initialised with the skeletal mesh component of the parent Actor.For runtime animation retargeting, if the Actor has multiple skeletal mesh components, this property must be set.

SkeletalMeshConfig

FglTFRuntimeSkeletalMeshConfig

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.

Public Functions

Function

Returns

Text

LoadAvatar( const FAvatarLoadCompleted& OnLoadCompleted, const FAvatarLoadFailed& OnLoadFailed);

void

Downloads the avatar from the web and generates a skeletal mesh of it. If the model was previously downloaded and stored locally, the local model will be used if avatar caching is enabled.

LoadNewAvatar( const FString& Url, const FAvatarLoadCompleted& OnLoadCompleted, const FAvatarLoadFailed& OnLoadFailed);

void

โ€‹

LoadRender(const ERenderSceneType& SceneType, const FDownloadImageCompleted& OnCompleted, const FDage for townloadImageFailed& OnFailed);

void

Loads the rendered image of the avatar from the server. By setting the SceneType the avatar can be rendered in different scenes.

CancelAvatarLoad();

void

Immediately cancels avatar loading. When the garbage collector is removing the component, avatar loading gets automatically cancelled.

LoadAvatar() and LoadNewAvatar() Parameters

Parameter

Description

const FAvatarLoadCompleted& OnLoadCompleted

Success callback. Called when the avatar asset is downloaded and the skeletal mesh is set.

const FAvatarLoadFailed& OnLoadFailed

Failure callback. If the avatar fails to load, the failure callback will be called.

const FString& Url

Avatar URL or shortcode.

โ€‹

Last updated