버전 비교

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

...

Initialization and Status Change Event Processing

...

SDK

...

Initialization

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_init_sdk
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTApplication.InitSDK();

...

Start

...

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_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의 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 
        {
            // 자동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

...

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_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

...

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_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] If resume이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 경우 시작 화면으로 이동해서 다시 신규 로그인 flow를 수행합니다of authentication failure, move 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

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_set_use_auto_login
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

// 자동로그인사용Set 유무를whether 세팅,to 세팅하지 않으면 사용하지 않음 상태로 세팅
// 자동로그인사용설정으로 로그인이 성공하면 자동로그인정보가 생성됨
// 자동로그인정보가 존재하면 다음 KGTApplication의 start시에 자동로그인이 진행됨으로 자동로그인정보를 제거하려면 로그아웃을 진행해야함use auto-login; if not set, it defaults to not using auto-login.
// When auto-login is enabled and login is 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

...

발췌문 삽입
EN_Login SDK Example
EN_Login SDK Example
namelogin
nopaneltrue

...

Logging In Without Using the Default Login UI

발췌문 삽입
EN_Login SDK Example
EN_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

발췌문 삽입
EN_Login SDK Example
EN_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의 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.
        }
    });
});

...

Logout

...

발췌문 삽입
EN_Logout SDK Example
EN_Logout SDK Example
namelogout
nopaneltrue

...

Logging Out Without Using the Default Logout UI

발췌문 삽입
EN_Logout SDK Example
EN_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

...

발췌문 삽입
탈퇴 SDK 예제
탈퇴 SDK 예제
nameunregister
nopaneltrue

...

Unregistering Without Using the Default Unregistration UI

발췌문 삽입
탈퇴 SDK 예제
탈퇴 SDK 예제
nameunregister_custom
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

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

...

Account Linking

...

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

...

Linking Accounts Without Using the Default Account Linking UI

발췌문 삽입
EN_Account Linking SDK Example
EN_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
    }
    else if (result.code == KGTResultCode.InvalidState) 
    {
        // 이미 연결되어 있는 경우When the account is already connected
    }
    else if (result.code == KGTResultCode.AlreadyUsedIDPAccount) 
    {
        // 이미 사용중인 IDP계정으로 연결을 시도한 경우When attempting to connect with an IDP account that is already in use
    }
    else 
    {
        // Other 밖의 에러errors
    }
});

프로필

...

Profile

...

Retrieve My Information

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

코드 블럭
languagec#
using KakaoGame.API;

KGTPlayer player = KGTPlayer.CurrentPlayer;

...

Retrieve My IDP

...

Information

발췌문 삽입
EN_Profile SDK Example
EN_Profile SDK Example
nameplayer_idpProfile
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTIdpProfile idpProfile = KGTPlayer.CurrentPlayer.IdpProfile;

시스템 정보

...

System Information

...

Retrieve Language Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_language_code
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string languageCode = KGTSystem.LanguageCode;

...

Retrieve Country Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_country_code
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string countryCode = KGTSystem.CountryCode;

...

Retrieve IP-based Country Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_geo_country_code
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string geoCountryCode = KGTSystem.GeoCountryCode;

...

Retrieve Device ID

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_device_id
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string deviceId = KGTSystem.DeviceId;

...

Retrieve Device Model

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_device_model
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string deviceModel = KGTSystem.DeviceModel;

Retrieve OS

...

Name

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_os_name
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string osName = KGTSystem.OsName;

...

Retrieve Network Connection Status

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_is_network_connected
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

bool isNetworkConnected = KGTSystem.IsNetworkConnected;

...

Retrieve Connected Network Type

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_network_type
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string networkType = KGTSystem.NetworkType;

...

Retrieve Set Game Language Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_game_language_code
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

string gameLanguageCode = KGTSystem.GameLanguageCode;

...

Set Game Language Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_set_game_language_code
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

var languageCode = KGTLanguageCode.Device;
KGTSystem.SetGameLanguageCode(languageCode);

카카오 연동 기능

...

Kakao Integration Feature

...

Setting Up KakaoTalk Game Message Reception

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_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 not a KakaoTalk user, such as in the case of a user who is only registered for KakaoStory.
    }
    else 
    {
        // Failed 카카오톡to set 게임the 메시지KakaoTalk 수신game 여부message 설정reception 실패settings
    }
});

...

KakaoTalk Profile Retrieval

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_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 not a KakaoTalk user, such as in the case of a user who is only registered for KakaoStory.
    }
    else 
    {
        // 카카오톡Failed to 프로필retrieve 조회KakaoTalk 실패profile
    }
});

...

Retrieving KakaoTalk Game Friend List

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_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)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우= KGTResultCode.NotKakaoTalkUser)
    {
        // The logged-in user is not a 'KakaoTalk' user. This occurs when the user is not a KakaoTalk user, such as in the case of a user who is only registered for KakaoStory.
    }
    else 
    {
        // 카카오톡Failed to 게임retrieve 메시지KakaoTalk 수신game 여부message 설정reception 실패settings
    }
});

...

Sending KakaoTalk Game Messages

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_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)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우code == KGTResultCode.NotKakaoTalkUser)
    {
        // The logged-in user is not a 'KakaoTalk' user. This occurs when the user is not a KakaoTalk user, such as in the case of a user who is only registered for KakaoStory.
    }
    else 
    {
        // Failed 카카오톡to 채팅send 메시지KakaoTalk 보내기chat 실패message.
    }
});

...

Sending KakaoTalk Friend Invitation Messages

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_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

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_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)
    {
        // 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우 The logged-in user is not a 'KakaoTalk' user. This occurs when the user is not a KakaoTalk user, such as in the case of a user who is only registered for KakaoStory.
    }
    else
    {
        // 친구Failed to 추가하기add 실패friend
    }
});

구글 게임

...

Google Games

...

ShowAchievement Screen

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_show_achievement_view
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

KGTGoogleGamesAchievements.ShowAchievementView();

...

Achievement Unlocked

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_unlock
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

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

KGTGoogleGamesAchievements.Unlock(id);

...

Display Achievement

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_reveal
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

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

KGTGoogleGamesAchievements.Reveal(id);

...

Increase Achievement Level

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_increment
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

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

KGTGoogleGamesAchievements.SetSteps(id, numSteps);

...

Set Achievement Level

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_set_steps
nopaneltrue

코드 블럭
languagec#
using KakaoGame.API;

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

KGTGoogleGamesAchievements.Increment(id, numSteps);

...