Navigation
API > API/Plugins > API/Plugins/MLAdapter > API/Plugins/MLAdapter/Sessions > API/Plugins/MLAdapter/Sessions/UMLAdapterSession > API/Plugins/MLAdapter/Sessions/UMLAdapterSession/RequestAvatarForAgent
References
| Module | MLAdapter |
| Header | /Engine/Plugins/AI/MLAdapter/Source/MLAdapter/Public/Sessions/MLAdapterSession.h |
| Include | #include "Sessions/MLAdapterSession.h" |
| Source | /Engine/Plugins/AI/MLAdapter/Source/MLAdapter/Private/Sessions/MLAdapterSession.cpp |
virtual bool RequestAvatarForAgent
(
UMLAdapterAgent & 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 FMLAdapterAgentConfig.AvatarClass and confirmed by Agent->IsSuitableAvatar call. If no suitable avatar is found this agent will be added to "waiting list" (AwaitingAvatar) True if an avatar has been assigned. False otherwise.
Parameters
| Name | Description |
|---|---|
| bForceSearch | if true will ignore whether the Agent is already waiting in AwaitingAvatar and will perform the search right away. Note that the Agent might still end up in AwaitingAvatar if there's no suitable avatars available |