FGL_PlayerSession AwsPlayerSessionToUe()

in GameLiftPlugin/Source/GameLiftClient/Private/GameLiftClientSDKModels.cpp [72:124]


	FGL_PlayerSession AwsPlayerSessionToUe(GAMELIFT_PLAYERSESSION_INSTANCE_HANDLE PlayerSession)
	{
		FGL_PlayerSession Result;

		GAMELIFT_PLAYERSESSION_INFO PlayerSessionInfo;

		GameLiftPlayerSessionGetInfo(PlayerSession, &PlayerSessionInfo);

		if (PlayerSessionInfo.dnsName)
		{
			Result.DnsName = AWSSerializer::ASToFS(PlayerSessionInfo.dnsName);
		}

		if (PlayerSessionInfo.fleetArn)
		{
			Result.FleetArn = AWSSerializer::ASToFS(PlayerSessionInfo.fleetArn);
		}

		if (PlayerSessionInfo.fleetId)
		{
			Result.FleetId = AWSSerializer::ASToFS(PlayerSessionInfo.fleetId);
		}

		if (PlayerSessionInfo.gameSessionId)
		{
			Result.GameSessionId = AWSSerializer::ASToFS(PlayerSessionInfo.gameSessionId);
		}

		if (PlayerSessionInfo.ipAddress)
		{
			Result.IpAddress = AWSSerializer::ASToFS(PlayerSessionInfo.ipAddress);
		}

		if (PlayerSessionInfo.playerData)
		{
			Result.PlayerData = AWSSerializer::ASToFS(PlayerSessionInfo.playerData);
		}

		if (PlayerSessionInfo.playerId)
		{
			Result.PlayerId = AWSSerializer::ASToFS(PlayerSessionInfo.playerId);
		}

		if (PlayerSessionInfo.playerSessionId)
		{
			Result.PlayerSessionId = AWSSerializer::ASToFS(PlayerSessionInfo.playerSessionId);
		}
		
		Result.Port = PlayerSessionInfo.port;
		Result.Status = static_cast<EGL_PlayerSessionStatus>(PlayerSessionInfo.status);

		return Result;
	}