버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

코드 블럭
languagecpp
#include "KakaoGameV4.h"

FKGTApplication::Start(FKGTResultDelegate::CreateLambda([=](FKGTResult result)
{
  if (result.IsSuccess())
  {
    // If the start is successful
    
    // Check if auto-login is enabled
    bool isLoggedIn = FKGTPlayer::IsLoggedIn();
    
    if (isLoggedIn)
    {
      // The current Player's ID issued by the platform
      FString playerId = FKGTPlayer::GetCurrentPlayer().GetPlayerId();

      // Platform access token
      FString accessToken = FKGTPlayer::GetAccessToken();

      // Retrieve the current IDP authentication information
      FKGTIdpProfile idpProfile = FKGTPlayer::GetCurrentPlayer().GetIdpProfile();

      // [TODO] Move to the game screen.
    }
    else
    {
      // [TODO] If auto-login is not enabled, move to the login screen.
    }
  }
  else
  {
    // If the start fails - Initializationsince initialization failed, so you should either retry the start or close the app.
    int32 resultCode = result.GetCode();

    if (resultCode == FKGTResultCode::NetworkFailure || resultCode == FKGTResultCode::ServerTimeout || resultCode == FKGTResultCode::ServerConnectionFailed)
    {
      // [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry.
    }
    else
    {
      // [TODO] If other errors occur, notify the user and request a retry of the start process. If the issue persists, check the error code and logs to determine the cause.
    }
  }
}));

...