Gamebaseでサポートする付加機能を説明します。
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
FString GetDeviceLanguageCode() const;
[参考]
Gamebaseのクライアントメッセージは英語(en)、韓国語(ko)、日本語(ja)のみ含みます。
Code | Name |
---|---|
de | German |
en | English |
es | Spanish |
fi | Finnish |
fr | French |
id | Indonesian |
it | Italian |
ja | Japanese |
ko | Korean |
pt | Portuguese |
ru | Russian |
th | Thai |
vi | Vietnamese |
ms | Malay |
zh-CN | Chinese-Simplified |
zh-TW | Chinese-Traditional |
言語コードはGamebaseDisplayLanguageCode
クラスに定義されています。
[注意]
Gamebaseでサポートする言語コードは、大文字/小文字を区別します。 「EN」または「zh-cn」と設定すると、問題が発生する場合があります。
namespace GamebaseDisplayLanguageCode
{
static const FString German(TEXT("de"));
static const FString English(TEXT("en"));
static const FString Spanish(TEXT("es"));
static const FString Finnish(TEXT("fi"));
static const FString French(TEXT("fr"));
static const FString Indonesian(TEXT("id"));
static const FString Italian(TEXT("it"));
static const FString Japanese(TEXT("ja"));
static const FString Korean(TEXT("ko"));
static const FString Portuguese(TEXT("pt"));
static const FString Russian(TEXT("ru"));
static const FString Thai(TEXT("th"));
static const FString Vietnamese(TEXT("vi"));
static const FString Malay(TEXT("ms"));
static const FString Chinese_Simplified(TEXT("zh-CN"));
static const FString Chinese_Traditional(TEXT("zh-TW"));
}
Gamebase初期化時のDisplay Languageを設定できます。
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
void Initialize(const FGamebaseConfiguration& configuration, const FGamebaseLaunchingInfoDelegate& onCallback);
Example
void Sample::Initialize(const FString& appID, const FString& appVersion)
{
FGamebaseConfiguration configuration;
...
configuration.displayLanguageCode = displayLanguage;
...
IGamebase::Get().Initialize(configuration, FGamebaseLaunchingInfoDelegate::CreateLambda([=](const FGamebaseLaunchingInfo* launchingInfo, const FGamebaseError* error)
{
if (Gamebase::IsSuccess(error))
{
UE_LOG(GamebaseTestResults, Display, TEXT("Initialize succeeded."));
FString displayLanguage = IGamebase::Get().GetDisplayLanguageCode();
}
else
{
UE_LOG(GamebaseTestResults, Display, TEXT("Initialize failed."));
}
}));
}
Gamebase初期化時、入力されたDisplay Languageを変更できます。
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
void SetDisplayLanguageCode(const FString& languageCode);
Example
void Sample::SetDisplayLanguageCode(cosnt FString& displayLanguage)
{
FString displayLanguage = IGamebase::Get().SetDisplayLanguageCode(displayLanguage);
}
現在適用されているDisplay Languageを照会できます。
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
FString GetDisplayLanguageCode() const;
Example
void Sample::GetDisplayLanguageCode()
{
FString displayLanguage = IGamebase::Get().GetDisplayLanguageCode();
}
Unreal Android、iOSプラットフォームでの新規言語セット追加方法は、下記のガイドを参照してください。
初期化およびSetDisplayLanguageCode APIでDisplay Languageを設定する場合、最終適用されるDisplay Languageは、入力した値と異なる値が適用される場合があります。
en
が自動的に設定されます。API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
FString GetCountryCodeOfUSIM() const;
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
FString GetCountryCodeOfDevice() const;
API
■ UNREAL_IOS ■ UNREAL_ANDROID
FString GetCountryCode() const;
GamebaseEventHandlerは以下のAPIを利用して簡単にListenerを追加/削除できます。
GamebaseEventHandlerは下記のAPIを利用して簡単にHandlerを追加/削除できます。
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
FDelegateHandle AddHandler(const FGamebaseEventDelegate::FDelegate& onCallback);
void RemoveHandler(const FDelegateHandle& handle);
void RemoveAllHandler();
VO
struct GAMEBASE_API FGamebaseEventMessage
{
// Eventの種類を表します。
// GamebaseEventCategoryクラスの値が割り当てられます。
FString category;
// 各categoryに合ったVOに変換できるJSON Stringデータです。
FString data;
};
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::IdPRevoked))
{
auto idPRevokedData = FGamebaseEventIdPRevokedData::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::LoggedOut))
if (message.category.Equals(GamebaseEventCategory::LoggedOut))
{
auto loggedOutData = FGamebaseEventLoggedOutData::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::ServerPushAppKickOut) ||
message.category.Equals(GamebaseEventCategory::ServerPushAppKickOutMessageReceived) ||
message.category.Equals(GamebaseEventCategory::ServerPushTransferKickout))
{
auto serverPushData = FGamebaseEventServerPushData::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::ObserverLaunching))
{
auto observerData = FGamebaseEventObserverData::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::ObserverNetwork))
{
auto observerData = FGamebaseEventObserverData::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::ObserverHeartbeat))
{
auto observerData = FGamebaseEventObserverData::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::PurchaseUpdated))
{
auto purchasableReceipt = FGamebaseEventPurchasableReceipt::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::PushReceivedMessage))
{
auto pushMessage = FGamebaseEventPushMessage::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::PushClickMessage))
{
auto pushMessage = FGamebaseEventPushMessage::From(message.data);
}
else if (message.category.Equals(GamebaseEventCategory::PushClickAction))
{
auto pushAction = FGamebaseEventPushAction::From(message.data);
}
}));
}
Event種類 | GamebaseEventCategory | VO変換方法 | 備考 |
---|---|---|---|
IdPRevoked | GamebaseEventCategory::IdPRevoked | FGamebaseEventIdPRevokedData::From(message.data) | - |
LoggedOut | GamebaseEventCategory::LoggedOut | FGamebaseEventLoggedOutData::From(message.data) | - |
ServerPush | GamebaseEventCategory::ServerPushAppKickOut GamebaseEventCategory::ServerPushAppKickOutMessageReceived GamebaseEventCategory::ServerPushTransferKickout |
FGamebaseEventServerPushData::From(message.data) | - |
Observer | GamebaseEventCategory::ObserverLaunching GamebaseEventCategory::ObserverNetwork GamebaseEventCategory::ObserverHeartbeat |
FGamebaseEventObserverData::From(message.data) | - |
Purchase - プロモーション決済 | GamebaseEventCategory::PurchaseUpdated | FGamebaseEventPurchasableReceipt::From(message.data) | - |
Push - メッセージ受信 | GamebaseEventCategory::PushReceivedMessage | FGamebaseEventPushMessage::From(message.data) | |
Push - メッセージクリック | GamebaseEventCategory::PushClickMessage | FGamebaseEventPushMessage::From(message.data) | |
Push - アクションクリック | GamebaseEventCategory::PushClickAction | FGamebaseEventPushAction::From(message.data) | RichMessageボタンを押すと動作します。 |
[参考]
iOS Appleidログインを使用する場合にのみ発生するイベントです。
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::IdPRevoked))
{
auto idPRevokedData = FGamebaseEventIdPRevokedData::From(message.data);
if (idPRevokedData.IsValid())
{
ProcessIdPRevoked(idPRevokedData);
}
}
}));
}
void Sample::ProcessIdPRevoked(const FGamebaseEventIdPRevokedData& data)
{
auto revokedIdP = data->idPType;
switch (data->code)
{
// 現在使用停止しているIdPでログインしていて、マッピングされたIdPリストがないことを意味します。
// ユーザーに現在のアカウントが退会していることを伝えてください。
case GamebaseIdPRevokeCode::Withdraw:
{
IGamebase::Get().Withdraw(FGamebaseErrorDelegate::CreateLambda([=](const FGamebaseError* error)
{
...
}));
break;
}
case GamebaseIdPRevokeCode::OverwriteLoginAndRemoveMapping:
{
// 現在使用停止しているIdPでログインしていて、使用停止したIdP以外の他のIdPがマッピングされている場合を意味します。
// ユーザーがauthMappingListのうちどのIdPで再度ログインするか選択し、選択したIdPでログインした後、使用停止したIdPについては連動を解除してください。
auto selectedIdP = "ユーザーが選択したIdP";
auto additionalInfo = NewObject<UGamebaseJsonObject>();
additionalInfo->SetBoolField(GamebaseAuthProviderCredential::IgnoreAlreadyLoggedIn, true);
IGamebase::Get().Login(selectedIdP, *additionalInfo, FGamebaseAuthTokenDelegate::CreateLambda([=](const FGamebaseAuthToken* authToken, const FGamebaseError* error)
{
if (Gamebase::IsSuccess(error))
{
IGamebase::Get().RemoveMapping(revokedIdP, FGamebaseErrorDelegate::CreateLambda([=](const FGamebaseError* error)
{
...
}));
}
}));
break;
}
case GamebaseIdPRevokeCode::RemoveMapping:
{
// 現在のアカウントにマッピングされているIdPのうち使用停止しているIdPがある場合を意味します。
// ユーザーに現在アカウントで使用停止しているIdPが連動解除されていることを伝えてください。
IGamebase::Get().RemoveMapping(revokedIdP, FGamebaseErrorDelegate::CreateLambda([=](const FGamebaseError* error)
{
...
}));
break;
}
}
}
Example
public void AddEventHandlerSample()
{
Gamebase.AddEventHandler(GamebaseEventHandler);
}
private void GamebaseEventHandler(GamebaseResponse.Event.GamebaseEventMessage message)
{
switch (message.category)
{
case GamebaseEventCategory.LOGGED_OUT:
{
GamebaseResponse.Event.GamebaseEventLoggedOutData loggedData = GamebaseResponse.Event.GamebaseEventLoggedOutData.From(message.data);
if (loggedData != null)
{
// There was a problem with the access token.
// Call login again.
}
break;
}
}
}
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::LoggedOut))
{
auto loggedOutData = FGamebaseEventLoggedOutData::From(message.data);
if (loggedData.IsValid() == true)
{
// There was a problem with the access token.
// Call login again.
}
}
}));
}
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::ServerPushAppKickOut) ||
message.category.Equals(GamebaseEventCategory::ServerPushAppKickOutMessageReceived) ||
message.category.Equals(GamebaseEventCategory::ServerPushTransferKickout))
{
auto serverPushData = FGamebaseEventServerPushData::From(message.data);
if (serverPushData.IsVaild())
{
CheckServerPush(message.category, *serverPushData);
}
}
}));
}
void Sample::CheckServerPush(const FString& category, const FGamebaseEventServerPushData& data)
{
if (message.category.Equals(GamebaseEventCategory::ServerPushAppKickOut))
{
// Kicked out from Gamebase server.(Maintenance, banned or etc.)
// And the game user closes the kickout pop-up.
// Return to title and initialize Gamebase again.
}
else if (message.category.Equals(GamebaseEventCategory::ServerPushAppKickOutMessageReceived))
{
// Currently, the kickout pop-up is displayed.
// If your game is running, stop it.
}
else if (message.category.Equals(GamebaseEventCategory::ServerPushTransferKickout))
{
// If the user wants to move the guest account to another device,
// if the account transfer is successful,
// the login of the previous device is released,
// so go back to the title and try to log in again.
}
}
struct GAMEBASE_API FGamebaseEventObserverData
{
// 状態値を表す情報です。
int32 code;
// 状態に関連するメッセージ情報です。
FString message;
// 追加情報用の予備フィールドです。
FString extras;
}
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::ObserverLaunching))
{
auto observerData = FGamebaseEventObserverData::From(message.data);
if (observerData.IsVaild())
{
CheckLaunchingStatus(*observerData);
}
}
else if (message.category.Equals(GamebaseEventCategory::ObserverNetwork))
{
auto observerData = FGamebaseEventObserverData::From(message.data);
if (observerData.IsVaild())
{
CheckNetwork(*observerData);
}
}
else if (message.category.Equals(GamebaseEventCategory::ObserverHeartbeat))
{
auto observerData = FGamebaseEventObserverData::From(message.data);
if (observerData.IsVaild())
{
CheckHeartbeat(*observerData);
}
}
}));
}
void Sample::CheckLaunchingStatus(const FGamebaseEventObserverData& data)
{
switch (data.code)
{
case GamebaseLaunchingStatus::IN_SERVICE:
{
// Service is now normally provided.
break;
}
// ...
case GamebaseLaunchingStatus::INTERNAL_SERVER_ERROR:
{
// Error in internal server.
break;
}
}
}
void Sample::CheckNetwork(const FGamebaseEventObserverData& data)
{
switch ((GamebaseNetworkType)data.code)
{
case EGamebaseNetworkType::Not:
{
// Network disconnected.
break;
}
case EGamebaseNetworkType::Mobile:
case EGamebaseNetworkType::Wifi:
case EGamebaseNetworkType::Any:
{
// Network connected.
break;
}
}
}
void Sample::CheckHeartbeat(const FGamebaseEventObserverData& data)
{
switch (data.code)
{
case EGGamebaseErrorCode::INVALID_MEMBER:
{
// You can check the invalid user session in here.
// ex) After transferred account to another device.
break;
}
case EGGamebaseErrorCode::BANNED_MEMBER:
{
// You can check the banned user session in here.
break;
}
}
}
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::PurchaseUpdated))
{
auto purchasableReceipt = FGamebaseEventPurchasableReceipt::From(message.data);
if (purchasableReceipt.IsVaild())
{
// If the user got item by 'Promotion Code',
// this event will be occurred.
}
}
}));
}
VO
struct FGamebaseEventPushMessage
{
// メッセージ固有のidです。
FString id;
// Pushメッセージタイトルです。
FString title;
// Pushメッセージ本文内容です。
FString body;
// JSON形式でPush送信時、送信したカスタム情報を確認できます。
FString extras;
};
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::PushReceivedMessage))
{
auto pushMessage = FGamebaseEventPushMessage::From(message.data);
if (pushMessage.IsVaild())
{
// When you clicked push message.
// By converting the extras field of the push message to JSON,
// you can get the custom information added by the user when sending the push.
// (For Android, an 'isForeground' field is included so that you can check if received in the foreground state.)
}
}
}));
}
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::PushClickMessage))
{
auto pushMessage = FGamebaseEventPushMessage::From(message.data);
if (pushMessage.IsVaild())
{
// When you clicked push message.
}
}
}));
}
VO
struct FGamebaseEventPushAction
{
// ボタンアクション種類です。
FString actionType;
// PushMessageデータです。
FGamebaseEventPushMessage message;
// Pushコンソールで入力したユーザーテキストです。
FString userText;
};
Example
void Sample::AddEventHandler()
{
IGamebase::Get().AddEventHandler(FGamebaseEventDelegate::FDelegate::CreateLambda([=](const FGamebaseEventMessage& message)
{
if (message.category.Equals(GamebaseEventCategory::PushClickAction))
{
auto pushAction = FGamebaseEventPushAction::From(message.data);
if (pushAction.IsVaild())
{
// When you clicked action button by 'Rich Message'.
}
}
}));
}
Game指標をGamebase Serverへ転送できます。
[注意]
Gamebase AnalyticsでサポートするすべてのAPIはログイン後に呼び出せます。
[TIP]
RequestPurchase APIを呼び出して決済が完了すると、自動的に指標を転送します。
Analytics Consoleの使用方法は、下記のガイドを参照してください。
ゲームログイン後、ゲームユーザーレベル情報を指標として転送できます。
[注意]
ゲームログイン後、SetGameUserData APIを呼び出さない場合、他の指標からLevel情報が漏れる場合があります。
APIの呼び出しに必要なパラメータは下記のとおりです。
FGamebaseAnalyticsUserData
Name | Mandatory(M) / Optional(O) | type | Desc |
---|---|---|---|
userLevel | M | int32 | ゲームユーザーレベルを表すフィールドです。 |
channelId | O | FString | チャンネルを表すフィールドです。 |
characterId | O | FString | キャラクター名を表すフィールドです。 |
characterClassId | O | FString | 職業を表すフィールドです。 |
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
void SetGameUserData(const FGamebaseAnalyticsUserData& gameUserData);
Example
void Sample::SetGameUserData(int32 userLevel, const FString& channelId, const FString& characterId, const FString& characterClassId)
{
FGamebaseAnalyticsUserData gameUserData{ userLevel, channelId, characterId, characterClassId };
IGamebase::Get().GetAnalytics().SetGameUserData(gameUserData);
}
レベルアップした時、ゲームユーザーレベル情報を指標として転送できます。
APIの呼び出しに必要なパラメータは下記の通りです。
LevelUpData
Name | Mandatory(M) / Optional(O) | type | Desc |
---|---|---|---|
userLevel | M | int32 | ゲームユーザーレベルを表すフィールドです。 |
levelUpTime | M | int64 | Epoch Timeで入力します。Millisecond単位で入力します。 |
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
void TraceLevelUp(const FGamebaseAnalyticesLevelUpData& levelUpData);
Example
void Sample::TraceLevelUpNow(int32 userLevel)
{
FGamebaseAnalyticesLevelUpData levelUpData{ userLevel, FDateTime::Now().ToUnixTimestamp() };
IGamebase::Get().GetAnalytics().TraceLevelUp(levelUpData);
}
Gamebaseは、顧客からの問い合わせに対応するための機能を提供します。
[TIP]
NHN Cloud Contactサービスと連携して使用すると、より簡単に顧客からの問い合わせに対応できます。 詳しいNHN Cloud Contactサービス利用方法は、下記のガイドを参照してください。 NHN Cloud Online Contact Guide
Gamebaseコンソール > App > InApp URL > Service centerでは、以下の3つのタイプのサポートを選択できます。
Customer Service Type | Required Login |
---|---|
Developer customer center | X |
Gamebase customer center | △ |
NHN Cloud Online Contact | O |
タイプに応じてGamebase SDKのサポートAPIは次のURLを使用します。
サポートWebビューを表示します。 URLはサポートタイプに基づいて決定されます。 ContactConfigurationでURLに追加情報を伝達できます。
FGamebaseContactConfiguration
Parameter | Mandatory(M) / Optional(O) |
Values | Description |
---|---|---|---|
userName | O | FString | ユーザー名前(ニックネーム) default : "" |
additionalURL | O | FString | 開発会社独自のサポートURLの後ろにつく追加のURL default : "" |
extraData | O | TMap |
開発会社が任意のextra dataをサポートオープン時に伝達 default : EmptyMap |
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID ■ UNREAL_WINDOWS
void OpenContact(const FGamebaseErrorDelegate& onCloseCallback);
void OpenContact(const FGamebaseContactConfiguration& configuration, const FGamebaseErrorDelegate& onCloseCallback);
ErrorCode
Error Code | Description |
---|---|
NOT_INITIALIZED(1) | Gamebase.initializeが呼び出されませんでした。 |
NOT_LOGGED_IN(2) | サポートタイプが'NHN Cloud OC'なのにログイン前に呼び出しました。 |
UI_CONTACT_FAIL_INVALID_URL(6911) | サポートURLが存在しません。 GamebaseコンソールのサポートURLを確認してください。 |
UI_CONTACT_FAIL_ISSUE_SHORT_TERM_TICKET(6912) | ユーザーを識別するための臨時チケットの発行に失敗しました。 |
UI_CONTACT_FAIL_ANDROID_DUPLICATED_VIEW(6913) | サポートWebビューがすでに表示中です。 |
Example
void Sample::OpenContact()
{
IGamebase::Get().GetContact().OpenContact(FGamebaseErrorDelegate::CreateLambda([=](const FGamebaseError* error)
{
if (Gamebase::IsSuccess(error))
{
UE_LOG(GamebaseTestResults, Display, TEXT("OpenContact succeeded."));
}
else
{
UE_LOG(GamebaseTestResults, Display, TEXT("OpenContact failed. (errorCode: %d, errorMessage: %s)"), error->code, *error->message);
if (error->code == GamebaseErrorCode::WEBVIEW_INVALID_URL)
{
// Gamebase Console Service Center URL is invalid.
// Please check the url field in the NHN Cloud Gamebase Console.
auto launchingInfo = IGamebase::Get().GetLaunching().GetLaunchingInformations();
UE_LOG(GamebaseTestResults, Display, TEXT("csUrl: %s"), *launchingInfo->launching.app.relatedUrls.csUrl);
}
}
}));
}
[注意]
サポートへお問い合わせする時、ファイルの添付が必要な場合があります。 そのため、ユーザーからカメラ撮影やStorage保存の権限をランタイムに取得する必要があります。
Androidユーザー
Unrealの場合エンジンに内蔵されている Android Runtime Permissionプラグインを有効にした後、以下のAPI Referenceを確認して必要な権限を取得してください。 Unreal API Reference : AndroidPermission
iOSユーザー
- info.plistに'Privacy - Camera Usage Description'、'Privacy - Photo Library Usage Description'の設定を行ってください。
サポートのWebビューを表示するのに使用されるURLを返します。
API
void RequestContactURL(const FGamebaseContactUrlDelegate& onCallback);
void RequestContactURL(const FGamebaseContactConfiguration& configuration, const FGamebaseContactUrlDelegate& onCallback);
ErrorCode
Error Code | Description |
---|---|
NOT_INITIALIZED(1) | Gamebase.initializeが呼び出されませんでした。 |
NOT_LOGGED_IN(2) | サポートタイプが'NHN Cloud OC'なのにログイン前に呼び出しました。 |
UI_CONTACT_FAIL_INVALID_URL(6911) | サポートURLが存在しません。 GamebaseコンソールのサポートURLを確認してください。 |
UI_CONTACT_FAIL_ISSUE_SHORT_TERM_TICKET(6912) | ユーザーを識別するための臨時チケットの発行に失敗しました。 |
Example
void Sample::RequestContactURL(const FString& userName)
{
FGamebaseContactConfiguration configuration{ userName };
IGamebase::Get().GetContact().RequestContactURL(configuration, FGamebaseContactUrlDelegate::CreateLambda([=](FString url, const FGamebaseError* error)
{
if (Gamebase::IsSuccess(error))
{
// Open webview with 'contactUrl'
UE_LOG(GamebaseTestResults, Display, TEXT("RequestContactURL succeeded. (url = %s)"), *url);
}
else
{
UE_LOG(GamebaseTestResults, Display, TEXT("RequestContactURL failed. (errorCode: %d, errorMessage: %s)"), error->code, *error->message);
if (error->code == GamebaseErrorCode::UI_CONTACT_FAIL_INVALID_URL)
{
// Gamebase Console Service Center URL is invalid.
// Please check the url field in the NHN Cloud Gamebase Console.
}
else
{
// An error occur when requesting the contact web view url.
}
}
}));
}