Skip to main content

Execution

Open the Playnanoo Help Desk to allow users to submit and view inquiries.

URL Check

This feature uses the help.playnanoo.com domain.

Feature Overview

The Help Desk operates in two modes:

  • Guest Mode: Allows inquiries from users who are not logged in
  • Player Mode: Registers inquiries with logged-in user information

Authentication Method

Player mode authenticates through the authKey parameter.

AuthKey Generation

#include "Misc/Base64.h"

FString CreateAuthKey(const FString& GameId, const FString& UserId)
{
// AuthKey = Base64(GameId + UserId)
FString AuthKeySource = GameId + UserId;
return FBase64::Encode(AuthKeySource);
}

Unreal C++ Implementation

Opening in Player Mode

Opens the Help Desk with logged-in user information.

void OpenHelpDeskPlayerMode()
{
// AuthKey 생성
FString AuthKey = CreateAuthKey(GameId, UUID);

// URL 생성
FString Url = FString::Printf(
TEXT("https://help.playnanoo.com/%s?userId=%s&authKey=%s"),
*GameId,
*FGenericPlatformHttp::UrlEncode(UUID),
*FGenericPlatformHttp::UrlEncode(AuthKey)
);

// 브라우저에서 열기
FPlatformProcess::LaunchURL(*Url, nullptr, nullptr);
}

URL Parameters:

ParameterDescription
userIdUnique user ID (UUID)
authKeyBase64 encoded authentication key

Opening in Guest Mode

Help Desk for users who are not logged in. No authentication required.

void OpenHelpDeskGuestMode()
{
FString Url = FString::Printf(
TEXT("https://help.playnanoo.com/%s?mode=guest"),
*GameId
);

FPlatformProcess::LaunchURL(*Url, nullptr, nullptr);
}

Optional Parameters

You can pass additional custom information per game.

void OpenHelpDeskWithOptional()
{
// Optional 파라미터를 JSON으로 생성
TSharedPtr<FJsonObject> OptionalJson = MakeShareable(new FJsonObject());
OptionalJson->SetStringField(TEXT("GAME_SERVER"), TEXT("ASIA"));
OptionalJson->SetStringField(TEXT("PLAYER_LEVEL"), TEXT("50"));
OptionalJson->SetStringField(TEXT("CHARACTER_CLASS"), TEXT("Warrior"));

// JSON을 문자열로 변환
FString OptionalString;
TSharedRef<TJsonWriter<>> Writer = TJsonWriterFactory<>::Create(&OptionalString);
FJsonSerializer::Serialize(OptionalJson.ToSharedRef(), Writer);

// Base64 인코딩
FString OptionalBase64 = FBase64::Encode(OptionalString);

// AuthKey 생성
FString AuthKey = CreateAuthKey(GameId, UUID);

// URL 생성 (optional 파라미터 포함)
FString Url = FString::Printf(
TEXT("https://help.playnanoo.com/%s?userId=%s&authKey=%s&optional=%s"),
*GameId,
*FGenericPlatformHttp::UrlEncode(UUID),
*FGenericPlatformHttp::UrlEncode(AuthKey),
*FGenericPlatformHttp::UrlEncode(OptionalBase64)
);

FPlatformProcess::LaunchURL(*Url, nullptr, nullptr);
}

Optional Parameter Examples

ParameterDescription
GAME_SERVERGame server (e.g., ASIA, NA, EU)
PLAYER_LEVELPlayer level
CHARACTER_CLASSCharacter class/job
GUILD_NAMEGuild/clan name
LAST_STAGELast played stage
ERROR_CODEError code (when error occurs)
Using Optional Parameters

By passing game state information along with user inquiries through optional parameters, the customer support team can identify and resolve issues more quickly.

Usage Examples

Branching Based on Login Status

void OpenHelpDesk()
{
if (bIsLoggedIn)
{
OpenHelpDeskPlayerMode();
}
else
{
OpenHelpDeskGuestMode();
}
}

Automatically Opening on Error

void OnApplicationError(const FString& ErrorMessage)
{
// Optional에 에러 정보 포함
TSharedPtr<FJsonObject> OptionalJson = MakeShareable(new FJsonObject());
OptionalJson->SetStringField(TEXT("ERROR_MESSAGE"), ErrorMessage);
OptionalJson->SetStringField(TEXT("ERROR_TIME"), FDateTime::Now().ToString());

// ... (이후 OpenHelpDeskWithOptional과 동일)
}
Multi-language Support

The Help Desk automatically detects the browser's language settings and displays in the corresponding language.

WebView Recommended

For a better user experience, we recommend using a WebView plugin instead of FPlatformProcess::LaunchURL.