6.1. Player Data Query Example

6.1. Player Data Query Example

 


6.1.1. Querying My Data

This section shows an example of a query of my data.

Unity

using Kakaogame.SDK;   // Retrieves the data object of the current player // Null is returned if not authenticated KGLocalPlayer localPlyer = KGLocalPlayer.currentPlayer;

Android

// Retrieves the data object of the current player // Null is returned if not authenticated KGLocalPlayer localPlayer = KGLocalPlayer.getCurrentPlayer();

iOS

#import <KakaoGame/KakaoGame.h>   // Retrieves the data object of the current player // Nil is returned if not authenticated KGLocalPlayer *localPlayer = [KGLocalPlayer currentPlayer];

Windows

Unreal

6.1.2. Querying Friend’s Data List

This section shows an example of a query of a friend’s data list. It is supported only when authenticated with Kakao or Facebook IDP.

   If you are certified as a Kakao IDP, you will see a list of your Kakao friend information.

If you are certified as a Facebook IDP, you will see a list of your Facebook friend information.

Otherwise, a NotSupported error will occur. 

Unity

Android

iOS

Windows Sync

Windows Async

Unreal

6.1.3. Updating My IDP Data

This section shows an example of an update of my IDP data.
If the IDP data is updated, the IDP access token and the data of each IDP are all updated.
For example, if you change your nickname in KakaoTalk, you need to call that API and update the changed nickname information. Note that we update with new IDP information every time we authenticate.

Unity

Android

iOS

 Windows Sync

Windows Async

Unreal

6.1.4. Detailed view of my IDP information.

How to get detailed information about my IDP profile information.
You can view the information provided by each IDP profile.

Unity

Android

iOS 예제

 Windows

Unreal

6.1.5. Querying my member key data

This section shows an example of an query of my member key data.
The member key data can be used for the reward of pre reservation event.
After login process, the member key data may be deliverd to game server and game server will check whether participate in pre reservation event and reward the item if neeeded.

Unity

Android

iOS

Windows

Unreal