Gamebase에서 지원하는 부가 기능을 설명합니다.
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
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
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
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;
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
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))
{
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 버튼 클릭 시 동작합니다. |
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
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.
}
}
VO
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
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 | long | Epoch Time으로 입력합니다.Millisecond 단위로 입력합니다. |
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
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 을 사용합니다.
고객 센터 웹뷰를 표시합니다. URL은 고객 센터 유형에 따라 결정됩니다. ContactConfiguration으로 URL에 추가 정보를 전달할 수 있습니다.
FGamebaseContactConfiguration
Parameter | Mandatory(M) / Optional(O) |
Values | Description |
---|---|---|---|
userName | O | FString | 사용자 이름(닉네임) default: "" |
additionalURL | O | FString | 개발사 자체 고객 센터 URL 뒤에 붙는 추가적인 URL default: "" |
additionalParameters | O | TMap |
고객센터 URL 뒤에 붙는 추가적인 파라미터 default : EmptyMap |
extraData | O | TMap |
개발사가 원하는 extra data를 고객 센터 오픈 시에 전달 default: EmptyMap |
API
Supported Platforms ■ UNREAL_IOS ■ UNREAL_ANDROID
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) | 고객 센터 웹뷰가 이미 표시중입니다. |
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 TOAST 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' 설정을 해주시기 바랍니다.
고객 센터 웹뷰를 표시하는데 사용되는 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 TOAST Gamebase Console.
}
else
{
// An error occur when requesting the contact web view url.
}
}
}));
}