UE4U4MLSession::RequestAvatarForAgent

Finds a suitable avatar in InWorld (or CachedWorld, if InWorld is null) for given agent, as specified by [F4MLAgentConfig.AvatarClass](API\Plugins\UE4ML\Agents\F4MLAgentConfig\AvatarClass) and confirmed by Agent->IsSuitableAvatar call.

Windows
MacOS
Linux

References

Module

UE4ML

Header

/Engine/Plugins/AI/UE4ML/Source/UE4ML/Public/4MLSession.h

Include

#include "4MLSession.h"

Syntax

virtual bool RequestAvatarForAgent
(
    U4MLAgent & Agent,
    UWorld * InWorld,
    const bool bForceSearch
)

Remarks

Finds a suitable avatar in InWorld (or CachedWorld, if InWorld is null) for given agent, as specified by F4MLAgentConfig.AvatarClass and confirmed by Agent->IsSuitableAvatar call. If no suitable avatar is found this agent will be added to "waiting list" (AwaitingAvatar)

that the Agent might still end up in AwaitingAvatar if there's no suitable avatars available

Returns

true if an avatar has been assigned. False otherwise.

Parameters

Parameter

Description

bForceSearch

if true will ignore whether the Agent is already waiting in AwaitingAvatar and will perform the search right away.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss