/
Unity Client SDK API
Unity Client SDK API
- 1 Initialization and Status Change Event Processing
- 1.1 SDK Initialization
- 1.2 Start
- 1.3 Pause
- 1.4 Resume
- 1.5 Setting Up Auto Login in a Windows Environment
- 2 Login
- 3 Logout
- 4 Unregistration
- 5 Account Linking
- 6 Profile
- 7 System Information
- 8 Kakao Integration Feature
- 8.1 Setting Up KakaoTalk Game Message Reception
- 8.2 Retrieve KakaoTalk Profile
- 8.3 Retrieve KakaoTalk Game Friend List
- 8.4 Sending KakaoTalk Game Messages
- 8.5 Sending KakaoTalk Friend Invitation Messages
- 8.6 Adding a KakaoTalk Channel
- 8.7 Retrieve the list of friends to whom I sent an invite message
- 8.8 Retrieve the count of friends to whom I sent an invite message
Initialization and Status Change Event Processing
SDK Initialization
using KakaoGame.API;
KGTApplication.InitSDK();
Start
using KakaoGame.API;
KGTApplication.Start((result) =>
{
if (result.IsSuccess)
{
// Start successful
if (KGTPlayer.IsLoggedIn)
{
// Auto login successful
// 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
using KakaoGame.API;
// Implement in the background transition function of appDelegate
// [Note] Implement in OnApplicationPause.
// [Note] Do not implement in OnApplicationFocus.
void OnApplicationPause(bool paused) {
// Method to be executed when the game moves to the background
// The Pause API always returns success.
// Therefore, you do not need to check the result separately in the game.
if (paused)
{
KGTApplication.Pause((result) => {});
}
}
Resume
Setting Up Auto Login in a Windows Environment
Login
Logging In Without Using the Default Login UI
Logging In Through the Launcher
Logout
Logging Out Without Using the Default Logout UI
Unregistration
Unregistering Without Using the Default Unregistration UI
Account Linking
Linking Accounts Without Using the Default Account Linking UI
Profile
Retrieve My Information
Retrieve My IDP Information
System Information
Retrieve Language Code
Retrieve Country Code
Retrieve IP-based Country Code
Retrieve Device ID
Retrieve Device Model
Retrieve OS Name
Retrieve Network Connection Status
Retrieve Connected Network Type
Kakao Integration Feature
Setting Up KakaoTalk Game Message Reception
Retrieve KakaoTalk Profile
Retrieve KakaoTalk Game Friend List
Sending KakaoTalk Game Messages
Sending KakaoTalk Friend Invitation Messages
Adding a KakaoTalk Channel
Retrieve the list of friends to whom I sent an invite message
Retrieve the count of friends to whom I sent an invite message
, multiple selections available,
Related content
Unity 클라이언트 SDK API
Unity 클라이언트 SDK API
More like this
Unreal Client SDK API
Unreal Client SDK API
More like this
Android Client SDK API
Android Client SDK API
More like this
Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing SDK Example
More like this
iOS Client SDK API
iOS Client SDK API
More like this
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
Read with this