How to convert AwsStringOutcome to FString or FName in UE5?

0

Im using Gamelift for my UE5 game and have some gamelift server sdk code init. One among them is getting the session id using Aws::GameLift::AwsStringOutcome sessionIdAWS = Aws::GameLift::Server::GetGameSessionId(). The question is how can I convert this AwsStringOutcome to Fstring or other UE datatypes so that I can use it as I want?

질문됨 일 년 전247회 조회
1개 답변
0

Hi!

You should be able to extract the FString from the outcome object that is returned by GetGameSessionId().

auto outcome = Aws::GameLift::Server::GetGameSessionId();
if (outcome.IsSuccess()){
   FString gameSessionId = outcome.getResult();
} else {
  // error handling goes here
}

Thanks!

AWS
답변함 일 년 전
  • Aws::GameLift::Server::Model::DescribePlayerSessionsRequest DescribePlayerSessionsRequest; DescribePlayerSessionsRequest.SetGameSessionId(TCHAR_TO_ANSI(*sessionId)); DescribePlayerSessionsRequest.SetPlayerSessionStatusFilter("RESERVED");

    auto DescribePlayerSessionsOutcome = Aws::GameLift::Server::DescribePlayerSessions(DescribePlayerSessionsRequest); 
    

    How to forloop through this and get all player IDs for players in reserved status. This would be highly helpful thanks. I am not able to understand the syntax from the documentation.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠