1.4. Windows SDK Installation
1.4. Windows SDK Installation
1.4.1. Installation and Runtime Environment
Minimum version
Visual Studio 2017
Recommended version
Visual Studio 2019
1.4.2. SDK File Content
The received KakaoGameSDK_Windows_[version].zip file is composed of the following files.
File/Directory | Descriptions |
---|---|
KGObject.h |
|
KGData.h |
|
KakaoGameLib.h |
|
KakaoGameLib.lib |
|
KakaoGameLibTest.exe |
|
Binary |
|
ApiReference |
|
1.4.3. SDK Installation
1.4.3.1. Linking the library to the project and loading the DLL
Copy the files in the Binary folder to your project.
Copy the necessary files for KGObject.h, KGData.h, KakaoGameLib.h, KakaoGameLib.lib and KakaoGame.dll.
Execute KakaoGame.dll loading function.
DLL loading
#include "KakaoGameLib.h"
#pragma comment (lib, "KakaoGameLib.lib")
// Loading by filename or loading by file handle
KakaoGame::API::KGInit::initialize(TEXT("KakaoGame.dll"));
or
KakaoGame::API::KGInit::initialize(FPlatformProcess::GetDllHandle(TEXT("KakaoGame.dll"))); |
1.4.3.2. Set KakaoGame SDK Properties
Set app information
Set app information
#include "KakaoGameLib.h" // Enter the information to be delivered in App ID and App Secret. // Enter the version of the game program you are running. // When adding only Kakao login settings KakaoGame::API::KGSetting kgSetting; kgSetting.setAppInfo(appId, appSecret, appKey, appVersion); // When supporting multiple login IDPs std::map<std::wstring, std::wstring> kakaoSetting, facebookSetting, googleSetting, appleSetting, twitterSetting, gamaniaSetting; kakaoSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("kakao_client_id"))); facebookSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("facebook_client_id"))); googleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("google_client_id"))); googleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientSecret"), TEXT("google_client_secret"))); appleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("apple_client_id"))); twitterSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("consumerKey"), TEXT("twitter_client_key"))); twitterSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("consumerSecret"), TEXT("twitter_client_secret"))); gamaniaSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("gamania_client_id"))); std::map<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>> idpSettings; idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Kakao, kakaoSetting)); idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Facebook, facebookSetting)); idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Google, googleSetting)); idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::SigninWithApple, appleSetting)); idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Twitter, twitterSetting)); idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Gamania, gamaniaSetting)); kgSetting.setAppInfo(appId, appSecret, idpSettings, appVersion); // Server Type // domestic : KakaoGame::Data::KGServerType::QA_Type, KakaoGame::Data::KGServerType::Real_Type // global : KakaoGame::Data::KGServerType::QA_Global_Type, KakaoGame::Data::KGServerType::Real_Global_Type kgSetting.setServerType(KakaoGame::Data::KGServerType::Real_Type); // log level(verbose, debug, error, none) KakaoGame::API::KGInternal kgInternal; kgInternal.setLogLevel(TEXT("none"));
KakaoGame SDK Properties
Key | Type | Necessary | Descriptions | Example |
---|---|---|---|---|
appId | String | O | Sets the app ID. You can check it in 3.0 Admin -> Game Build -> Client Version Control. | 103815 |
appSecret | String | O | This is the same as the Native App Key, which can be found in Kakao Partner Center> Game Management> Select App> Game Details. | 951b75bf17fe0885ab5106ba2a9f9bc9 |
appKey | String | according to the calling function | JavaScript key that can be found in Kakao Partner Center > App information |
|
idpSettings | MAP | according to the calling function | [ Specified key value by IDP ]
|
|
appVersion | String | O | Sets the app version. App update requirements are provided automatically based on the set version. |
|
ServerType | int | X | Sets the server type ("KakaoGame::Data::KGServerType::Real_Type" or "KakaoGame::Data::KGServerType::Real_Global_Type": Actual service, "KakaoGame::Data::KGServerType::QA_Type" or "KakaoGame::Data::KGServerType::QA_Global_Type": QA). If not set, it is set to "real" by default. | KakaoGame::Data::KGServerType::Real_Type |
Debug Level | String | X | Sets the log level ("verbose", "debug", "error", "none" ). If not set, it is set to "none" by default | none |