버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
목차
minLevel1
maxLevel6
outlinefalse
stylenone

초기화 및 상태변화 이벤트 처리

...

typelist
printabletrue

...

Initialization and Status Change Event Processing

...

SDK Initialization

발췌문 삽입
KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
nameapplication_init_sdk
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTApplication.InitSDK();

...

Start

...

발췌문 삽입
KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
nameapplication_start
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTApplication.Start((result) =>
{
    if (result.IsSuccess)
    {
        // Start 성공successful
        if (KGTPlayer.IsLoggedIn) 
        {
            // 자동Auto 로그인login 성공successful
            // 플랫폼에서 발급한 현재 Player의 IDThe current Player's ID issued by the platform
            string playerId = KGTPlayer.CurrentPlayer.PlayerId;
            // 플랫폼Platform 액세스access 토큰token
            string accessToken = KGTPlayer.AccessToken;
            // Retrieve the 현재current IDP 인증authentication 정보를information
가져옴             var idpProfile = KGTPlayer.CurrentPlayer.IdpProfile;
            // [TODO] 게임Log 서버in 로그인to the 게임game 화면으로server 이동and proceed to the game screen
   }     } 
   else     else 
        {
            // 자동No 로그인auto 정보login 없음information, call 로그인the login API
호출         }
    }
    else 
    {
        if (result.code == KGTResultCode.NetworkFailure ||
            result.code == KGTResultCode.ServerTimeout ||
            result.code == KGTResultCode.ServerConnectionFailed) 
        {
            // [TODO] 네트워크 에러가 발생한 경우에는 유저에게 네트워크 이슈로 스타트에 실패했음을 알리고 재시도In case of a network error, notify the user that the start failed due to network issues and retry
        } 
        else 
        {
            // [TODO] 유저에게Notify the 에러가user 발생했음을that 알림.an 에러error 원인occurred. 추적을It 위해would 에러코드도be 포함된helpful 문구이면 좋음to include the error code in the message for tracking the cause.
        }
    }
});

Pause

...

발췌문 삽입
KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
nameapplication_pause
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;


// appDelegate의 백그라운드 이동 함수에서 구현Implement in the background transition function of appDelegate
// [주의Note] Implement in OnApplicationPause 구현합니다.
// [주의Note] OnApplicationFocus에서는Do 구현하지not implement 않도록in 합니다OnApplicationFocus.
void OnApplicationPause(bool paused) {
    // 게임이 백그라운드로 이동되었을 때 실행해야 할 메소드 Method to be executed when the game moves to the background
    // The Pause API는API 항상always 성공을returns 반환합니다success.
    // 따라서 게임에서 별도로 result를 체크하지 않으셔도 됩니다 Therefore, you do not need to check the result separately in the game.
    if (paused)
    {
        KGTApplication.Pause((result) => {});
    }
}

Resume

...

발췌문 삽입
KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
nameapplication_resume
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;


// appDelegate의 백그라운드 이동 함수에서 구현Implement in the background transition function of appDelegate
// [주의Note] Implement in OnApplicationPause 구현합니다.
// [주의Note] Do OnApplicationFocus에서는not 구현하지implement 않도록in 합니다OnApplicationFocus.
void OnApplicationPause(bool paused) {
    if (!paused) // When moved 포그라운드로to 이동한the 상태foreground
    {
        // 게임이 포그라운드로 이동되었을 때 실행해야 할 메소드Method to be executed when the game moves to the foreground
        KGTApplication.Resume((result) => 
        {
            if (result.IsSuccess) 
            {
                // [TODO] resume이If resume 성공is successful, 경우resume 게임the 화면을game 재개합니다screen.
            } 
            else 
            {
                // [TODO] resume이 실패 한 경우 인증 실패 면 로그인 화면으로, 그외의 경우는 에러 팝업을 띄우고 재시도 여부를 확인합니다If resume fails, navigate to the login screen if it’s an authentication failure; otherwise, show an error popup and check if the user wants to retry.
                if (result.code == KGTResultCode.AuthFailure ||
                    result.code == KGTResultCode.IdpAuthFailure) 
                {
                    // [TODO] 인증In 실패의case 경우of 시작authentication 화면으로failure, 이동해서move 다시 신규 로그인 flow를 수행합니다to the start screen and perform the new login flow again.
                } 
                else 
                {
                    // [TODO] 나머지If 에러가other 발생한errors 경우occur, 경우provide 에러an 안내error notification resumeand retry 재시도the 합니다resume.
                }
            }
        });
    }
}

...

Setting Up Auto Login in a Windows Environment

발췌문 삽입
KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제KS4GFC:EN_초기화 및 상태변화 이벤트 처리 SDK 예제Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
nameapplication_set_use_auto_login
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// 자동로그인사용Set 유무를whether 세팅,to 세팅하지 않으면 사용하지 않음 상태로 세팅
// 자동로그인사용설정으로 로그인이 성공하면 자동로그인정보가 생성됨use auto-login; if not set, it defaults to not using auto-login.
// 자동로그인정보가When 존재하면auto-login 다음is KGTApplication의enabled start시에and 자동로그인이login 진행됨으로is 자동로그인정보를 제거하려면 로그아웃을 진행해야함
bool useAutoLogin = true;
successful, auto-login information is generated.
// If auto-login information exists, the next time KGTApplication starts, auto-login will proceed automatically. To remove the auto-login information, you must log out.
bool useAutoLogin = true;
KGTApplication.UseAutoLogin = useAutoLogin;

...

Login

...

발췌문 삽입
KS4GFC:EN_로그인 SDK 예제KS4GFC:EN_로그인 SDK 예제Login SDK Example
Login SDK Example
namelogin
nopaneltrue

...

Logging In Without Using the Default Login UI

발췌문 삽입
KS4GFC:EN_로그인 SDK 예제KS4GFC:EN_로그인 SDK 예제Login SDK Example
Login SDK Example
namelogin_custom
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTIdpCode idpCode = KGTIdpCode.Kakao;

KGTPlayer.Login(idpCode, (result) =>
{
    if (result.IsSuccess) 
    {
        // 로그인Handle 성공successful 처리login.
        // 플랫폼에서 발급한 현재 Player의 ID The current Player's ID issued by the platform
        string playerId = KGTPlayer.CurrentPlayer.PlayerId;
        // 플랫폼Platform 액세스access 토큰token
        string accessToken = KGTPlayer.AccessToken;
        // 현재Retrieve the current IDP 인증authentication 정보를information
가져옴         var idpProfile = KGTPlayer.CurrentPlayer.IdpProfile;
        // [TODO] 게임 서버 로그인 및 게임 화면으로 이동Log in to the game server and proceed to the game screen
    } 
    else 
    {
        // 로그인Handle 실패login 처리failure.
        if (result.code == KGTResultCode.NetworkFailure ||
            result.code == KGTResultCode.ServerTimeout ||
            result.code == KGTResultCode.ServerConnectionFailed) 
        {
            // [TODO] 네트워크 에러가 발생한 경우에는 로그인 재시도 요청 하여야 합니다 If a network error occurs, prompt the user to retry logging in.
        } 
        else if (result.code == KGTResultCode.Forbidden) 
        {
            // [TODO] CBT기간동안During 허용된the 유저외에는CBT 인증이period, 불가능authentication may not 있습니다.be 유저에게possible 안내메시지for 노출users 이후,who 확인are 클릭시, 앱을 종료하도록 구현합니다not allowed. Display a notification to the user, and after }clicking confirm, implement the app to exit.
        } 
        else if (result.code == KGTResultCode.UserCanceled) 
        {
            // [TODO] 사용자가 로그인 진행 중 취소한 상황이므로 로그인 화면을 유지 하여야 합니다Since the user canceled during the login process, the login screen should be maintained.
        } 
        else 
        {
            // [TODO] 나머지 에러가 발생한 경우에는 에러 안내 후 로그인 재시도 요청 하여야 합니다 If other errors occur, provide an error notification and prompt the user to retry logging in.
            // 에러코드It is 로그 확인 후 원인 파악이 필요합니다necessary to check the error code and logs to determine the cause.
        }
    });
});

...

Logging In Through the Launcher

발췌문 삽입
KS4GFC:EN_로그인 SDK 예제KS4GFC:EN_로그인 SDK 예제Login SDK Example
Login SDK Example
namelogin_with_bridge_token
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// 런처를The bridgeToken 통해서received 전달through 받은the bridgeTokenlauncher
string bridgeToken = "";

KGTPlayer.LoginWithBridgeToken(bridgeToken, (result) =>
{
    if (result.IsSuccess) 
    {
        // 로그인Handle 성공successful 처리login.
        // 플랫폼에서 발급한 현재 Player의 IDThe current Player's ID issued by the platform
        string playerId = KGTPlayer.CurrentPlayer.PlayerId;
        // 플랫폼Platform 액세스access 토큰token
        string accessToken = KGTPlayer.AccessToken;
        // Retrieve 현재the current IDP 인증authentication 정보를 가져옴information
        var idpProfile = KGTPlayer.CurrentPlayer.IdpProfile;
        // [TODO] 게임 서버 로그인 및 게임 화면으로 이동Log in to the game server and proceed to the game screen
    } 
    else 
    {
        // 로그인Handle 실패login 처리failure.
        if (result.code == KGTResultCode.NetworkFailure ||
            result.code == KGTResultCode.ServerTimeout ||
            result.code == KGTResultCode.ServerConnectionFailed) 
        {
            // [TODO] 네트워크 에러가 발생한 경우에는 로그인 재시도 요청 하여야 합니다 If a network error occurs, prompt the user to retry logging in.
        } 
        else if (result.code == KGTResultCode.Forbidden) 
        {
            // [TODO] CBT기간동안During 허용된the 유저외에는CBT 인증이period, 불가능authentication may 수 있습니다. 유저에게 안내메시지 노출 이후, 확인 클릭시, 앱을 종료하도록 구현합니다not be possible for users who are not allowed. Display a notification to the user, and after clicking confirm, implement the app to exit.
        } 
        else if (result.code == KGTResultCode.UserCanceled) 
        {
            // [TODO] 사용자가 로그인 진행 중 취소한 상황이므로 로그인 화면을 유지 하여야 합니다 Since the user canceled during the login process, the login screen should be maintained.
        } 
        else 
        {
            // [TODO] 나머지If 에러가other 발생한errors 경우에는occur, 에러 안내 후 로그인 재시도 요청 하여야 합니다provide an error notification and prompt the user to retry logging in.
            // 에러코드 및 로그 확인 후 원인 파악이 필요합니다It is necessary to check the error code and logs to determine the cause.
        }
    });
});

...

Logout

...

발췌문 삽입
KS4GFC:EN_로그아웃 SDK 예제KS4GFC:EN_로그아웃 SDK 예제Logout SDK Example
Logout SDK Example
namelogout
nopaneltrue

...

Logging Out Without Using the Default Logout UI

발췌문 삽입
KS4GFC:EN_로그아웃 SDK 예제KS4GFC:EN_로그아웃 SDK 예제Logout SDK Example
Logout SDK Example
namelogout_custom
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTPlayer.Logout(false, (result) =>
{
    if (result.IsSuccess) 
    {
        // 로그아웃Logout 성공successful
        // [TODO] 시작 화면으로 돌아가기Return to the start screen
    } 
    else 
    {
        // 로그아웃Logout 실패failed
    }
});

...

Unregistration

...

발췌문 삽입
KS4GFC:EN_탈퇴 SDK 예제KS4GFC:EN_탈퇴 SDK 예제Unregistration SDK Example
Unregistration SDK Example
nameunregister
nopaneltrue

...

Unregistering Without Using the Default Unregistration UI

발췌문 삽입
KS4GFC:EN_계정 연결 SDK 예제KS4GFC:EN_계정 연결 SDK 예제Unregistration SDK Example
Unregistration SDK Example
nameconnectunregister_custom
nopaneltrue

기본 계정 연결 UI를 사용하지 않는 계정 연결하기

...

코드 블럭
코드 블럭
languagec#
using KakaoGame.API;

KGTIdpCode idpCode = KGTIdpCode.Kakao;

KGTPlayer.ConnectUnregister(idpCodefalse, (result) =>
{
    if (result.IsSuccess) 
    {
        // 계정Unregistration 연결successful
성공     }   // [TODO] Return elseto if (result.code == KGTResultCode.NotAuthorized)the start screen
    } 
{
        // 현재 인증이 안되어 있는 경우
    }
    else if (result.code == KGTResultCode.InvalidState) 
    {
        // 이미Unregistration 연결되어failed
있는 경우   }
 }
    else if (result.code == KGTResultCode.AlreadyUsedIDPAccount) 
    {
        // 이미 사용중인 IDP계정으로 연결을 시도한 경우);

Account Linking

...

발췌문 삽입
Account Linking SDK Example
Account Linking SDK Example
nameconnect
nopaneltrue

Linking Accounts Without Using the Default Account Linking UI

발췌문 삽입
Account Linking SDK Example
Account Linking SDK Example
nameconnect_custom
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTIdpCode idpCode = KGTIdpCode.Kakao;

KGTPlayer.Connect(idpCode, (result) =>
{
    if (result.IsSuccess) 
    {
        // Account connection successful
    } 
    else if (result.code == KGTResultCode.NotAuthorized) 
    {
        // 그 밖의 에러 When the current session is not authenticated
    }
});

프로필

내 정보 조회하기

...

코드 블럭
languagec#
using KakaoGame.API;

KGTPlayer player = KGTPlayer.CurrentPlayer;

내 IDP 정보 조회하기

...

코드 블럭
languagec#
using KakaoGame.API;

KGTIdpProfile idpProfile = KGTPlayer.CurrentPlayer.IdpProfile;

시스템 정보

언어 코드 가져오기

...

코드 블럭
languagec#
using KakaoGame.API;

string languageCode = KGTSystem.LanguageCode;

국가 코드 가져오기

...


    else if (result.code == KGTResultCode.InvalidState) 
    {
        // When the account is already connected
    }
    else if (result.code == KGTResultCode.AlreadyUsedIDPAccount) 
    {
        // When attempting to connect with an IDP account that is already in use
    }
    else 
    {
        // Other errors
    }
});

Profile

...

Retrieve My Information

발췌문 삽입
Profile SDK Example
Profile SDK Example
nameplayer_currentPlayer
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

stringKGTPlayer countryCodeplayer = KGTSystemKGTPlayer.CountryCodeCurrentPlayer;

...

Retrieve My IDP Information

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제Profile SDK Example
Profile SDK Example
namesystem_geo_country_codeplayer_idpProfile
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

stringKGTIdpProfile geoCountryCodeidpProfile = KGTSystemKGTPlayer.CurrentPlayer.GeoCountryCodeIdpProfile;

...

System Information

...

Retrieve Language Code

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_devicelanguage_idcode
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string deviceIdlanguageCode = KGTSystem.DeviceIdLanguageCode;

...

Retrieve Country Code

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_devicecountry_modelcode
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string deviceModelcountryCode = KGTSystem.DeviceModelCountryCode;

...

Retrieve IP-based Country Code

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_osgeo_country_namecode
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string osNamegeoCountryCode = KGTSystem.OsNameGeoCountryCode;

...

Retrieve Device ID

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_isdevice_network_connectedid
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

boolstring isNetworkConnecteddeviceId = KGTSystem.IsNetworkConnectedDeviceId;

...

Retrieve Device Model

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_networkdevice_typemodel
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string networkTypedeviceModel = KGTSystem.NetworkTypeDeviceModel;

...

Retrieve OS Name

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_gameos_language_codename
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string gameLanguageCodeosName = KGTSystem.GameLanguageCodeOsName;

...

Retrieve Network Connection Status

발췌문 삽입
KS4GFC:EN_시스템 정보 SDK 예제KS4GFC:EN_시스템 정보 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_setis_gamenetwork_language_codeconnected
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

varbool languageCodeisNetworkConnected = KGTLanguageCode.Device;
KGTSystem.SetGameLanguageCode(languageCode)IsNetworkConnected;

카카오 연동 기능

카카오톡 게임 메시지 수신 여부 설정하기

Retrieve Connected Network Type

발췌문 삽입
KS4GFC:EN_카카오 연동 기능 SDK 예제KS4GFC:EN_카카오 연동 기능 SDK 예제System Information SDK Example
System Information SDK Example
namesystem_network_type
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string networkType = KGTSystem.NetworkType;

Kakao Integration Feature

...

Setting Up KakaoTalk Game Message Reception

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_show_setting
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTKakaoTalk.ShowSetting((result) => 
{
    if (result.IsSuccesIsSuccess) 
    {
        // 카카오톡Successfully 게임set 메시지the 수신KakaoTalk game 여부message 설정reception 성공settings
    }
    else if (result.code == KGTResultCode.NotKakaoTalkUser)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우 The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
    }
    else 
    {
        // Failed 카카오톡to set 게임the 메시지KakaoTalk 수신game 여부message 설정reception 실패settings
    }
});

...

Retrieve KakaoTalk Profile

발췌문 삽입
KS4GFC:EN_카카오 연동 기능 SDK 예제KS4GFC:EN_카카오 연동 기능 SDK 예제Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_talk_profile
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTKakaoTalk.TalkProfile((result) => 
{
    if (result.IsSuccesIsSuccess) 
    {
        // 카카오톡Successfully 프로필retrieved 조회KakaoTalk 성공profile
        KGTKakaoTalkProfile talkProfile = result.Content;
    }
    else if (result.code == KGTResultCode.NotKakaoTalkUser)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
    }
    else 
    {
        // 카카오톡Failed to 프로필retrieve 조회KakaoTalk 실패profile
    }
});

...

Retrieve KakaoTalk Game Friend List

발췌문 삽입
KS4GFC:EN_카카오 연동 기능 SDK 예제KS4GFC:EN_카카오 연동 기능 SDK 예제Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_friends
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTKakaoTalk.Friends((result) => 
{
    if (result.IsSuccesIsSuccess) 
    {
        var players = result.Content;
        // 카카오톡Successfully 게임retrieved 친구KakaoTalk 목록game 조회friends 성공list.
        foreach(var player in players) {
            var kakaoProfile = (KGTKakaoProfile)player.IdpProfile; // Used 게임when 메세지sending 전송시game 사용messages
        }
    }
    else if (result.code == KGTResultCode.NotKakaoTalkUser)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우 The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
    }
    else 
    {
        // 카카오톡Failed to 게임retrieve 메시지KakaoTalk 수신game 여부message 설정reception 실패settings
    }
});

...

Sending KakaoTalk Game Messages

발췌문 삽입
KS4GFC:EN_카카오 연동 기능 SDK 예제KS4GFC:EN_카카오 연동 기능 SDK 예제Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_send_game_message
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// Through the Friends API를API
통해
KGTKakaoFriendProfile kakaoProfile; // 카카오Kakao profile 프로필(KGTKakaoFriendProfile 객체object)

// [TODO] Set the 템플릿template Id
설정
string templateId;
  
// [TODO] Set the 메시지arguments 템플릿에for 설정한the 인자message 설정template
Dictionary<string, object> argumentDic = new Dictionary<string, object>();

KGTKakaoTalk.SendGameMessage(kakaoProfile, tempalteIdtemplateId, argumentDic, (result) => 
{
    if (result.IsSuccesIsSuccess) 
    {
        // 카카오톡Successfully sent 채팅a 메시지KakaoTalk 보내기chat 성공message.
    }
    else if (result.code == KGTResultCode.MessageSettingDisabled) 
    {
        // 받은이가 메시지 수신 거부를 설정한 경우The recipient has set message reception to be disabled.
    }
    else if (result.code == KGTResultCode.ExceedDailyUsage) 
    {
        // 한명이Occurs 특정when 앱에the 대해daily 보낼quota for 있는sending 하루messages 쿼터(받는to 사람a 관계없이)specific 초과시app 발생(regardless of the recipient) is exceeded.
    }
    else if (result.code == KGTResultCode.ExceedMonthlyUsage) 
    {
        // 한명이 특정 앱에 대해 특정인에게 보낼 수 있는 한달 쿼터 초과시 발생 Occurs when the monthly quota for sending messages to a specific person for a specific app is exceeded.
    }
    else if (result.code == KGTResultCode.NotKakaoTalkUser)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우.
     The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
    }
    else 
    {
        // 카카오톡Failed to 채팅send 메시지KakaoTalk 보내기chat 실패message.
    }
});

...

Sending KakaoTalk Friend Invitation Messages

발췌문 삽입
KS4GFC:EN_카카오 연동 기능 SDK 예제KS4GFC:EN_카카오 연동 기능 SDK 예제Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_send_invite_message
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// [TODO] 팝업창으로 띄울지 여부 설정 Set whether to display as a popup window
bool isSingle;

// [TODO] 팝업창으로 띄울지 여부 설정 Set whether to display as a popup window
bool isPopup;
  
// [TODO] 템플릿Set the template Id 설정
string templateId;
  
// [TODO] 메시지 템플릿에 설정한 인자 설정Set the arguments for the message template
Dictionary<string, object> argumentDic = new Dictionary<string, object>();

KGTKakaoTalk.SendInviteMessage(isSingle, isPopup, tempalteIdtemplateId, argumentDic, (result) =>
{
    if (result.IsSuccesIsSuccess) 
    {
        // 요청Request 성공successful
    }
    else
    {
        // 요청Request 실패failed
        if (result.code == KGTResultCode.MessageSettingDisabled)
        {
            // 받은이가 메시지 수신 거부를 설정한 경우The recipient has set message reception to be disabled.
        }
        else if (result.code == KGTResultCode.ExceedDailyUsage)
        {
            // 한명이 특정 앱에 대해 보낼 수 있는 하루 쿼터(받는 사람 관계없이) 초과시 발생 Occurs when the daily quota for sending messages to a specific app (regardless of the recipient) is exceeded.
        }
        else if (result.code == KGTResultCode.ExceedMonthlyUsage)
        {
            // 한명이 특정 앱에 대해 특정인에게 보낼 수 있는 한달 쿼터 초과시 발생Occurs when the monthly quota for sending messages to a specific person for a specific app is exceeded.
        }
        else if (result.code == KGTResultCode.NotKakaoTalkUser)
        {
            // 로그인 한 유저가 '카카오톡' 유저가 아닙니다 The logged-in user is not a 'KakaoTalk' user.
        }
        else
        {
            // Other 밖의errors
에러         }
    }
});

...

Adding a KakaoTalk Channel

발췌문 삽입
KS4GFC:EN_카카오 연동 기능 SDK 예제KS4GFC:EN_카카오 연동 기능 SDK 예제Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_add_plus_friend
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// [TODO] Set the 채널channel Id 설정
int channelId;

KGTKakaoTalk.AddChannel(channelId, (result) => 
{
    if (result.IsSuccesIsSuccess) 
    {
        // 친구Successfully 추가하기added 성공friend
    }
    else if (result.code == KGTResultCode.NotKakaoTalkUser)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의
계정과 같이 카카오톡 유저가 아닌 경우.
    }
    else
    {
        // 친구 추가하기 실패
    }
});

구글 게임

업적 달성 화면 보여주기

...

코드 블럭
languagec#
using KakaoGame.API;

KGTGoogleGamesAchievements.ShowAchievementView();

업적 달성

...

코드 블럭
languagec#
using KakaoGame.API;

// [TODO] 업적 아이디 설정
var id = "";

KGTGoogleGamesAchievements.Unlock(id);

업적 노출하기

...

코드 블럭
languagec#
using KakaoGame.API;

// [TODO] 업적 아이디 설정
var id = "";

KGTGoogleGamesAchievements.Reveal(id);

업적 단계 증가

...

       // The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
    }
    else
    {
        // Failed to add friend
    }
});

Retrieve the list of friends to whom I sent an invite message

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_invitation_joiners
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// [TODO] 업적 아이디 설정
var id = "";
var numSteps = 0;

KGTGoogleGamesAchievements.SetSteps(id, numSteps);

...

Retrieve the count of friends to whom I sent an invite message

발췌문 삽입
KS4GFC:EN_구글 게임 SDK 예제KS4GFC:EN_구글 게임 SDK 예제Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namegooglekakao_gamesinvitation_setreceivers_stepscount
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// [TODO] 업적 아이디 설정
var
id = "";
var numSteps = 0;

KGTGoogleGamesAchievements.Increment(id, numSteps);