Unreal Integration Guide
Everything you need to bring VNGGames to your game: sign-in, in-app purchase, analytics, ads, and player engagement: in one complete reference. Every method spells out its inputs and outputs field by field, and each one is directly linkable so you can jump straight to the call you need.
打造遊戲接入 VNGGames 所需的一切: 登入、應用程式內購買、分析、廣告與玩家互動: 全部整合於一份完整參考中。每個方法都逐一欄位說明其輸入與輸出,且每個方法都可直接連結,讓你能快速跳到所需的呼叫。
打造游戏接入 VNGGames 所需的一切: 登录、应用内购买、分析、广告与玩家互动: 全部整合于一份完整参考中。每个方法都逐一字段说明其输入与输出,且每个方法都可直接链接,让你能快速跳到所需的调用。
Get started
The VNGGames SDK ships as an Unreal plugin that compiles from source: there is no binary drop-in. You add it to a C++ project, enable it, and let the engine’s per-platform build steps stage the native SDKs for you.
VNGGames SDK 以 Unreal 外掛原始碼形式發佈,沒有預先編譯的版本可直接放入專案。請將它加入 C++ 專案並啟用,引擎的各平台建置步驟就會自動為你部署原生 SDK。
VNGGames SDK 以 Unreal 插件源码形式发布,没有预编译版本可直接放入项目。请将它加入 C++ 项目并启用,引擎的各平台构建步骤就会自动为你部署原生 SDK。
The plugin exports no API macro, so its C++ entry points do not link from a separate game module in a modular build. Drive the SDK from Blueprint, which is what the shipped demo does. The C++ tab on each method documents the real signatures for reading the API and for plugin-internal or monolithic builds.
此外掛未匯出 API 巨集,因此在模組化建置中,其 C++ 進入點無法從獨立的遊戲模組連結。請改用 Blueprint 呼叫 SDK,隨附的示範專案也是這樣做。各方法的 C++ 分頁用於閱讀真實簽章,以及外掛內部或單體式建置的情境。
此插件未导出 API 宏,因此在模块化构建中,其 C++ 入口点无法从独立的游戏模块链接。请改用 Blueprint 调用 SDK,随附的演示项目也是这样做的。各方法的 C++ 选项卡用于阅读真实签名,以及插件内部或单体式构建的场景。
Prerequisites
- Unreal Engine 5.5 or newer. The plugin declares no engine floor of its own, and the shipped docs are inconsistent: the Windows integration doc states 5.5+ validated on 5.7, while the demo project is associated with 5.7. Treat 5.5 as the minimum and 5.7 as the validated version.
- A C++ project. The plugin builds from source, so a Blueprint-only project must be converted first.
- The VNGGames SDK plugin package for your title, obtained from VNGGames.
- Per-title configuration assets, also from VNGGames: the Android service JSON files and signing keystore, the iOS property lists, and the Windows
vnggamessdk.dat. - Windows builds: Visual Studio 2022 with the Windows 10 or 11 SDK.
- iOS builds: macOS with Xcode.
- Android builds: network access from the build machine to the VNGGames Maven repository, which the plugin’s Gradle injection resolves its native dependency from.
- Unreal Engine 5.5 以上。 外掛本身未宣告引擎版本下限,且隨附文件說法不一致:Windows 整合文件寫 5.5 以上、在 5.7 驗證,而示範專案關聯的是 5.7。請以 5.5 為最低版本、5.7 為已驗證版本。
- C++ 專案。 外掛需要從原始碼建置,純 Blueprint 專案必須先轉換。
- 由 VNGGames 提供、對應你遊戲的 VNGGames SDK 外掛套件。
- 同樣由 VNGGames 提供的各遊戲設定檔:Android 的服務 JSON 檔與簽章 keystore、iOS 的 property list,以及 Windows 的
vnggamessdk.dat。 - Windows 建置:Visual Studio 2022 搭配 Windows 10 或 11 SDK。
- iOS 建置:macOS 搭配 Xcode。
- Android 建置:建置機器需能連線至 VNGGames Maven 儲存庫,外掛的 Gradle 注入會由此解析原生相依套件。
- Unreal Engine 5.5 以上。 插件本身未声明引擎版本下限,且随附文档说法不一致:Windows 集成文档写 5.5 以上、在 5.7 验证,而演示项目关联的是 5.7。请以 5.5 为最低版本、5.7 为已验证版本。
- C++ 项目。 插件需要从源码构建,纯 Blueprint 项目必须先转换。
- 由 VNGGames 提供、对应你游戏的 VNGGames SDK 插件包。
- 同样由 VNGGames 提供的各游戏配置文件:Android 的服务 JSON 文件与签名 keystore、iOS 的 property list,以及 Windows 的
vnggamessdk.dat。 - Windows 构建:Visual Studio 2022 搭配 Windows 10 或 11 SDK。
- iOS 构建:macOS 搭配 Xcode。
- Android 构建:构建机器需能连接 VNGGames Maven 仓库,插件的 Gradle 注入会由此解析原生依赖包。
Dependencies
Every third-party library the plugin brings into your build, one tab per build target. The iOS frameworks ship inside the plugin and are embedded by VNGGamesSDK.Build.cs. The Android target resolves its libraries through the vgsdk-service Gradle plugin from your pass-services.json, and the Windows target links one self-contained DLL.
外掛帶進你建置中的所有第三方函式庫,每個建置目標一個分頁。iOS framework 隨外掛一併發佈,並由 VNGGamesSDK.Build.cs 嵌入。Android 目標會透過 vgsdk-service Gradle 外掛依你的 pass-services.json 解析其函式庫,而 Windows 目標則連結單一自足的 DLL。
插件带进你构建中的所有第三方库,每个构建目标一个标签页。iOS framework 随插件一并发布,并由 VNGGamesSDK.Build.cs 嵌入。Android 目标会通过 vgsdk-service Gradle 插件依你的 pass-services.json 解析其库,而 Windows 目标则链接单一自足的 DLL。
| Library | Version | Group |
|---|---|---|
Reachability | 3.7.6 | Core |
KeychainAccess | 4.2.2 | Core |
SwiftCentrifuge | 0.8.2 | Core |
FirebaseCore | 11.15.0 | Core |
FirebaseInstallations | 11.15.0 | Core |
IASDKCore | 8.3.1 | Core |
FirebaseCoreInternal | 11.15.0 | Core |
FirebaseSharedSwift | 11.15.0 | Core |
GoogleUtilities | 8.1.0 | Core |
GoogleDataTransport | 10.1.0 | Core |
nanopb | 3.30910.0 | Core |
FBLPromises | 2.4.0 | Core |
AppCheckCore | 11.2.0 | Core |
SwiftProtobuf | 1.31.1 | Core |
FBSDKCoreKit | 18.0.1 | Login channels |
FBSDKCoreKit_Basics | 18.0.1 | Login channels |
FBAEMKit | 18.0.1 | Login channels |
FBSDKLoginKit | 18.0.1 | Login channels |
GoogleSignIn | 8.0.0 | Login channels |
AppAuth | 1.7.6 | Login channels |
GTMAppAuth | 4.1.1 | Login channels |
GTMSessionFetcher | 3.5.0 | Login channels |
ThinkingSDK | 3.3.2 | Analytics |
ThinkingDataCore | 1.3.2 | Analytics |
FBSDKShareKit | 18.0.1 | Social |
FBSDKGamingServicesKit | 18.0.1 | Social |
CleverTapSDK | 7.4.1 | Engage |
CTNotificationService | 0.1.7 | Engage |
CTNotificationContent | 1.1.0 | Engage |
FirebaseMessaging | 11.15.0 | Engage |
FirebaseRemoteConfig | 11.15.0 | Engage |
FirebaseInAppMessaging | 11.15.0 | Engage |
FirebaseABTesting | 11.15.0 | Engage |
FirebaseRemoteConfigInterop | 11.15.0 | Engage |
SDWebImage | 5.21.2 | Engage |
SocketRocket | 0.7.1 | Engage |
| 函式庫 | 版本 | 分組 |
|---|---|---|
Reachability | 3.7.6 | 核心 |
KeychainAccess | 4.2.2 | 核心 |
SwiftCentrifuge | 0.8.2 | 核心 |
FirebaseCore | 11.15.0 | 核心 |
FirebaseInstallations | 11.15.0 | 核心 |
IASDKCore | 8.3.1 | 核心 |
FirebaseCoreInternal | 11.15.0 | 核心 |
FirebaseSharedSwift | 11.15.0 | 核心 |
GoogleUtilities | 8.1.0 | 核心 |
GoogleDataTransport | 10.1.0 | 核心 |
nanopb | 3.30910.0 | 核心 |
FBLPromises | 2.4.0 | 核心 |
AppCheckCore | 11.2.0 | 核心 |
SwiftProtobuf | 1.31.1 | 核心 |
FBSDKCoreKit | 18.0.1 | 登入管道 |
FBSDKCoreKit_Basics | 18.0.1 | 登入管道 |
FBAEMKit | 18.0.1 | 登入管道 |
FBSDKLoginKit | 18.0.1 | 登入管道 |
GoogleSignIn | 8.0.0 | 登入管道 |
AppAuth | 1.7.6 | 登入管道 |
GTMAppAuth | 4.1.1 | 登入管道 |
GTMSessionFetcher | 3.5.0 | 登入管道 |
ThinkingSDK | 3.3.2 | 分析 |
ThinkingDataCore | 1.3.2 | 分析 |
FBSDKShareKit | 18.0.1 | 社群 |
FBSDKGamingServicesKit | 18.0.1 | 社群 |
CleverTapSDK | 7.4.1 | Engage |
CTNotificationService | 0.1.7 | Engage |
CTNotificationContent | 1.1.0 | Engage |
FirebaseMessaging | 11.15.0 | Engage |
FirebaseRemoteConfig | 11.15.0 | Engage |
FirebaseInAppMessaging | 11.15.0 | Engage |
FirebaseABTesting | 11.15.0 | Engage |
FirebaseRemoteConfigInterop | 11.15.0 | Engage |
SDWebImage | 5.21.2 | Engage |
SocketRocket | 0.7.1 | Engage |
| 库 | 版本 | 分组 |
|---|---|---|
Reachability | 3.7.6 | 核心 |
KeychainAccess | 4.2.2 | 核心 |
SwiftCentrifuge | 0.8.2 | 核心 |
FirebaseCore | 11.15.0 | 核心 |
FirebaseInstallations | 11.15.0 | 核心 |
IASDKCore | 8.3.1 | 核心 |
FirebaseCoreInternal | 11.15.0 | 核心 |
FirebaseSharedSwift | 11.15.0 | 核心 |
GoogleUtilities | 8.1.0 | 核心 |
GoogleDataTransport | 10.1.0 | 核心 |
nanopb | 3.30910.0 | 核心 |
FBLPromises | 2.4.0 | 核心 |
AppCheckCore | 11.2.0 | 核心 |
SwiftProtobuf | 1.31.1 | 核心 |
FBSDKCoreKit | 18.0.1 | 登录渠道 |
FBSDKCoreKit_Basics | 18.0.1 | 登录渠道 |
FBAEMKit | 18.0.1 | 登录渠道 |
FBSDKLoginKit | 18.0.1 | 登录渠道 |
GoogleSignIn | 8.0.0 | 登录渠道 |
AppAuth | 1.7.6 | 登录渠道 |
GTMAppAuth | 4.1.1 | 登录渠道 |
GTMSessionFetcher | 3.5.0 | 登录渠道 |
ThinkingSDK | 3.3.2 | 分析 |
ThinkingDataCore | 1.3.2 | 分析 |
FBSDKShareKit | 18.0.1 | 社交 |
FBSDKGamingServicesKit | 18.0.1 | 社交 |
CleverTapSDK | 7.4.1 | Engage |
CTNotificationService | 0.1.7 | Engage |
CTNotificationContent | 1.1.0 | Engage |
FirebaseMessaging | 11.15.0 | Engage |
FirebaseRemoteConfig | 11.15.0 | Engage |
FirebaseInAppMessaging | 11.15.0 | Engage |
FirebaseABTesting | 11.15.0 | Engage |
FirebaseRemoteConfigInterop | 11.15.0 | Engage |
SDWebImage | 5.21.2 | Engage |
SocketRocket | 0.7.1 | Engage |
Installation
Add the plugin to your project
Copy the VNGGamesSDK folder into your project’s Plugins directory, so it sits at <YourProject>/Plugins/VNGGamesSDK/. The package ships Source/, Docs/ and the .uplugin descriptor. It deliberately contains no Binaries/ or Intermediate/, which is why the first build compiles the plugin.
將 VNGGamesSDK 資料夾複製到專案的 Plugins 目錄下,路徑為 <YourProject>/Plugins/VNGGamesSDK/。套件內含 Source/、Docs/ 與 .uplugin 描述檔,並刻意不包含 Binaries/ 或 Intermediate/,因此第一次建置會編譯外掛。
将 VNGGamesSDK 文件夹复制到项目的 Plugins 目录下,路径为 <YourProject>/Plugins/VNGGamesSDK/。安装包内含 Source/、Docs/ 与 .uplugin 描述文件,并刻意不包含 Binaries/ 或 Intermediate/,因此第一次构建会编译插件。
Enable it in your .uproject
Add the plugin to the Plugins array of your .uproject, listing the target platforms you ship.
在 .uproject 的 Plugins 陣列中加入此外掛,並列出你要發佈的目標平台。
在 .uproject 的 Plugins 数组中加入此插件,并列出你要发布的目标平台。
"Plugins": [
{
"Name": "VNGGamesSDK",
"Enabled": true,
"SupportedTargetPlatforms": [ "Android", "IOS", "Win64" ]
}
]Reference the module from your game
Add VNGGamesSDK to your game module’s dependencies in its Build.cs.
在遊戲模組的 Build.cs 中,將 VNGGamesSDK 加入相依模組。
在游戏模块的 Build.cs 中,将 VNGGamesSDK 加入依赖模块。
PrivateDependencyModuleNames.AddRange(new string[] { "VNGGamesSDK" });Set the build environment
On an installed (Launcher) engine, set both of these in your Target.cs and TargetEditor.cs. Without them Unreal Build Tool fails with Targets with unique build environment cannot be built with installed engine. A source-built engine may keep its own unique environment.
使用安裝版(Launcher)引擎時,請在 Target.cs 與 TargetEditor.cs 中同時設定以下兩項。若未設定,Unreal Build Tool 會出現 Targets with unique build environment cannot be built with installed engine 錯誤。自行編譯的引擎則可維持其獨立環境。
使用安装版(Launcher)引擎时,请在 Target.cs 与 TargetEditor.cs 中同时设置以下两项。若未设置,Unreal Build Tool 会出现 Targets with unique build environment cannot be built with installed engine 错误。自行编译的引擎则可保持其独立环境。
BuildEnvironment = TargetBuildEnvironment.Shared;
DefaultBuildSettings = BuildSettingsVersion.V6;Regenerate and build
Regenerate your project files and build. The SDK initializes itself as soon as its module loads, so there is nothing to call at startup. Gate your first feature call on the Wait for initialization signal instead, because on the Windows target initialization is asynchronous.
重新產生專案檔並建置。SDK 會在模組載入時自行初始化,因此啟動時不需要呼叫任何項目。請改以 等待初始化完成 訊號作為第一個功能呼叫的前置條件,因為在 Windows 目標上初始化是非同步的。
重新生成项目文件并构建。SDK 会在模块加载时自行初始化,因此启动时不需要调用任何内容。请改以 等待初始化完成 信号作为第一个功能调用的前置条件,因为在 Windows 目标上初始化是异步的。
Platform configuration
iOS
The build script globs every .framework under Source/ThirdParty/iOS/Frameworks and every file under Source/ThirdParty/iOS/Resources, so the link set follows the folder rather than a hard-coded list. The property lists in Resources are part of your title’s export, so there is nothing to swap in by hand.
One item is NOT per-title and ships wrong in every package:
- Replace the
NSUserTrackingUsageDescriptiontext. The plugin injects it intoInfo.plistas the literal placeholderPut description here, and App Store review rejects builds that keep it. - Keep the
-ObjCshipping linker flag set, which the SDK’s static frameworks require.
One trap worth knowing: the build script RETURNS EARLY if Frameworks or Resources is missing, silently skipping the rest of the iOS setup including the system frameworks. A missing folder gives you a half-configured link rather than an error.
建置指令碼會掃描 Source/ThirdParty/iOS/Frameworks 下所有 .framework 與 Source/ThirdParty/iOS/Resources 下所有檔案,因此連結清單取決於資料夾內容而非寫死的列表。Resources 中的 property list 屬於你遊戲匯出內容的一部分,因此不需要手動替換。
有一項設定並非各遊戲專屬,且在每個套件中都是錯的:
- 替換
NSUserTrackingUsageDescription文字。 外掛會將它以字面上的預留字串Put description here注入Info.plist,若未修改,App Store 審核會退件。 - 保留
-ObjC發佈連結器旗標,SDK 的靜態 framework 需要它。
另有一個值得注意的陷阱:若 Frameworks 或 Resources 資料夾不存在,建置指令碼會提前返回,靜默略過其餘的 iOS 設定(包含系統 framework)。缺少資料夾時得到的是設定不完整的連結結果,而不是明確錯誤。
构建脚本会扫描 Source/ThirdParty/iOS/Frameworks 下所有 .framework 与 Source/ThirdParty/iOS/Resources 下所有文件,因此链接列表取决于文件夹内容而非写死的列表。Resources 中的 property list 属于你游戏导出内容的一部分,因此不需要手动替换。
有一项配置并非各游戏专属,且在每个包中都是错的:
- 替换
NSUserTrackingUsageDescription文本。 插件会将它以字面上的占位字符串Put description here注入Info.plist,若未修改,App Store 审核会拒绝。 - 保留
-ObjC发布链接器标志,SDK 的静态 framework 需要它。
另有一个值得注意的陷阱:若 Frameworks 或 Resources 文件夹不存在,构建脚本会提前返回,静默跳过其余的 iOS 配置(包含系统 framework)。缺少文件夹时得到的是配置不完整的链接结果,而不是明确错误。
Windows
The build script stages VNGGamesSDK.dll and vnggamessdk.dat next to your game executable, and the DLL is delay-loaded and resolved at runtime, so there is no import library to link.
The .dat is your title’s encrypted config and ships inside the export, so there is nothing to swap in by hand. What you do need to do:
- Declare the init config in your project’s
DefaultGame.ini. This is the one genuinely manual step on Windows, and the plugin ships it EMPTY.PackageNameis the only source for the package name here, because the engine has no equivalent setting, and initialization logs an error and falls back to the project name when it is blank. - Check the staged launcher matches your title. Deep-link registration keys off the launcher’s exact filename, and packages have shipped carrying a launcher named for a different game. If the
.exebeside the DLL is not yours, deep links will not resolve.
建置指令碼會將 VNGGamesSDK.dll 與 vnggamessdk.dat 部署到遊戲執行檔旁邊。該 DLL 採延遲載入並於執行期解析,因此不需要連結匯入函式庫。
.dat 是你遊戲的加密設定檔,已包含在匯出內容中,因此不需要手動替換。你需要做的是:
- 在專案的
DefaultGame.ini中宣告初始化設定。 這是 Windows 上唯一真正需要手動處理的步驟,而外掛提供的是空白值。在此PackageName是套件名稱的唯一來源,因為引擎沒有對應設定。若留空,初始化會記錄錯誤並改用專案名稱。 - 確認部署的啟動器與你的遊戲相符。 深層連結註冊會依據啟動器的確切檔名,而曾有套件隨附的啟動器是以其他遊戲命名。若 DLL 旁的
.exe不是你的,深層連結將無法解析。
构建脚本会将 VNGGamesSDK.dll 与 vnggamessdk.dat 部署到游戏可执行文件旁边。该 DLL 采用延迟加载并在运行时解析,因此不需要链接导入库。
.dat 是你游戏的加密配置文件,已包含在导出内容中,因此不需要手动替换。你需要做的是:
- 在项目的
DefaultGame.ini中声明初始化配置。 这是 Windows 上唯一真正需要手动处理的步骤,而插件提供的是空白值。在此PackageName是包名的唯一来源,因为引擎没有对应设置。若留空,初始化会记录错误并改用项目名称。 - 确认部署的启动器与你的游戏匹配。 深度链接注册会依据启动器的确切文件名,而曾有包随附的启动器是以其他游戏命名。若 DLL 旁的
.exe不是你的,深度链接将无法解析。
[VNGGamesSDK.InitConfig]
; The ONLY source for packageName on Windows. Always set it for production.
PackageName=com.yourcompany.yourgame
; Fallback for gameVersion. ProjectVersion is checked first.
GameVersion=1.0.0
; Passed through to the native SDK.
MaxInstances=0Verify the integration
Turn on the SDK’s log category, then run the game and confirm initialization reports success.
開啟 SDK 的記錄類別,接著執行遊戲並確認初始化回報成功。
开启 SDK 的日志类别,然后运行游戏并确认初始化报告成功。
[Core.Log]
LogVGSDK=all
[Core.System]
LogVGSDK=VeryVerboseEditor and other non-packaged builds fall back to the plugin’s default platform helper, which only logs. No SDK call reaches a native SDK there, so verify on a packaged build for the target you care about.
編輯器與其他未打包的建置會退回外掛的預設平台輔助程式,該程式僅輸出記錄。在這類環境中沒有任何 SDK 呼叫會到達原生 SDK,因此請在你關注之目標平台的打包版本上進行驗證。
编辑器与其他未打包的构建会回退到插件的默认平台辅助程序,该程序仅输出日志。在这类环境中没有任何 SDK 调用会到达原生 SDK,因此请在你关注的目标平台的打包版本上进行验证。
Initialization
The plugin initializes the SDK for you: its module calls into the native SDK as soon as it loads, so there is no init call to make. On the Android and iOS build targets that is synchronous. On the Windows target it is asynchronous, so wait for the signal below before calling any other feature.
外掛會自行初始化 SDK:模組載入時就會呼叫原生 SDK,因此你不需要自行呼叫初始化。在 Android 與 iOS 建置目標上,這個過程是同步的。在 Windows 目標上則為非同步,因此請先等待下方的訊號,再呼叫其他任何功能。
插件会自行初始化 SDK:模块加载时就会调用原生 SDK,因此你不需要自行调用初始化。在 Android 与 iOS 构建目标上,这个过程是同步的。在 Windows 目标上则为异步,因此请先等待下方的信号,再调用其他任何功能。
Wait for initialization
WindowsRegisters a listener that fires once the SDK has finished initializing.
註冊一個監聽器,在 SDK 完成初始化時觸發。
注册一个监听器,在 SDK 完成初始化时触发。
The plugin initializes itself when its module loads, so there is no init call to make. On the Windows build target that initialization is asynchronous, so gate your first feature call on this signal. Registering after initialization has already completed fires the listener immediately.
外掛會在模組載入時自行初始化,因此沒有需要你呼叫的初始化方法。在 Windows 建置目標上,初始化是非同步的,因此請先等待此訊號,再進行第一個功能呼叫。若在初始化完成之後才註冊,監聽器會立即觸發。
插件会在模块加载时自行初始化,因此没有需要你调用的初始化方法。在 Windows 构建目标上,初始化是异步的,因此请先等待此信号,再进行第一个功能调用。若在初始化完成之后才注册,监听器会立即触发。
// The plugin auto-initializes on module load, so you only register for the result.
// Late-subscriber safe: if init already finished, this fires immediately.
VGSDKWrapper::GetInstance()->SetOnInitCompletedListener(
[](bool bSuccess, const FVGSDKError& Error)
{
if (bSuccess)
{
// Safe to call any SDK feature from here on.
}
});
// Or poll, if you would rather gate a tick:
const bool bReady = VGSDKWrapper::GetInstance()->IsInitialized();Input
輸入
输入
| Field | Type | Description |
|---|---|---|
Listener | TFunction<void(bool, const FVGSDKError&)> | C++ only: the callback invoked once initialization resolves. Registering a second listener replaces the first, since the wrapper keeps a single slot. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Listener | TFunction<void(bool, const FVGSDKError&)> | 僅限 C++:初始化完成時呼叫的回呼。再次註冊會取代前一個,因為包裝層只保留單一插槽。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Listener | TFunction<void(bool, const FVGSDKError&)> | 仅限 C++:初始化完成时调用的回调。再次注册会取代前一个,因为包装层只保留单一插槽。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
Success | bool | true when the SDK initialized successfully. false means initialization failed and Error carries the reason. |
Error | FVGSDKError | The failure reason when Success is false. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Success | bool | SDK 初始化成功時為 true。為 false 表示初始化失敗,Error 會帶有原因。 |
Error | FVGSDKError | Success 為 false 時的失敗原因。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Success | bool | SDK 初始化成功时为 true。为 false 表示初始化失败,Error 会带有原因。 |
Error | FVGSDKError | Success 为 false 时的失败原因。请参阅 Unreal 插件错误码。 |
Authentication
Sign the player in through the SDK’s channel picker or a specific channel, and delete the signed-in account. Every login callback delivers the signed-in player’s info on success, or an error on cancel/failure. Zero-interaction quick login and VGA account management live in the Quick Authentication section.
透過 SDK 的頻道選擇器或指定頻道讓玩家登入,並可刪除已登入的帳號。每次登入回呼在成功時會傳回已登入玩家的資訊,在取消或失敗時則傳回錯誤。零互動的快速登入與 VGA 帳號管理位於 Quick Authentication 區段。
通过 SDK 的渠道选择器或指定渠道让玩家登录,并可删除已登录的账号。每次登录回调在成功时会返回已登录玩家的信息,在取消或失败时则返回错误。零交互的快速登录与 VGA 账号管理位于 Quick Authentication 部分。
Show the login form
WindowsPresents the login form so the player can pick a sign-in channel.
顯示登入表單,讓玩家選擇登入頻道。
显示登录表单,让玩家选择登录渠道。
if (IVGSDKPlatformHelper* Helper = VGSDKWrapper::GetInstance()->GetAndroidHelper())
{
Helper->ShowLoginForm(
[](const TVariant<FVGSDKUserInfo, FVGSDKError>& Result)
{
// Same result shape as Auto login.
});
}Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
Success | bool | true when the player signed in. false means the Error pin carries the reason. |
UserInfo | FVGSDKUserInfo | The signed-in player. Fields: FVGSDKUserInfo. Default-constructed and empty on failure. |
Error | FVGSDKError | The failure reason when Success is false, carrying Code and Message. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Success | bool | 玩家登入成功時為 true。為 false 表示 Error 接腳帶有原因。 |
UserInfo | FVGSDKUserInfo | 已登入的玩家。欄位請參閱 FVGSDKUserInfo。失敗時為預設建構的空值。 |
Error | FVGSDKError | Success 為 false 時的失敗原因,帶有 Code 與 Message。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Success | bool | 玩家登录成功时为 true。为 false 表示 Error 引脚带有原因。 |
UserInfo | FVGSDKUserInfo | 已登录的玩家。字段请参阅 FVGSDKUserInfo。失败时为默认构造的空值。 |
Error | FVGSDKError | Success 为 false 时的失败原因,带有 Code 与 Message。请参阅 Unreal 插件错误码。 |
Auto login
AndroidiOSSilently re-authenticates the last-used channel if a session exists, otherwise presents the login form.
若已存在工作階段,會以最近使用的頻道靜默重新驗證。否則顯示登入表單。
若已存在会话,会以最近使用的渠道静默重新验证。否则显示登录表单。
VGSDKWrapper::GetInstance()->AutoLogin(
[](const TVariant<FVGSDKUserInfo, FVGSDKError>& Result)
{
if (Result.IsType<FVGSDKUserInfo>())
{
const FVGSDKUserInfo& User = Result.Get<FVGSDKUserInfo>();
// Signed in: User.UserId, User.DisplayName, User.SessionId
}
else
{
const FVGSDKError& Error = Result.Get<FVGSDKError>();
}
});Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
Success | bool | true when the player signed in. false means the Error pin carries the reason. |
UserInfo | FVGSDKUserInfo | The signed-in player. Fields: FVGSDKUserInfo. Default-constructed and empty on failure. |
Error | FVGSDKError | The failure reason when Success is false, carrying Code and Message. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Success | bool | 玩家登入成功時為 true。為 false 表示 Error 接腳帶有原因。 |
UserInfo | FVGSDKUserInfo | 已登入的玩家。欄位請參閱 FVGSDKUserInfo。失敗時為預設建構的空值。 |
Error | FVGSDKError | Success 為 false 時的失敗原因,帶有 Code 與 Message。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Success | bool | 玩家登录成功时为 true。为 false 表示 Error 引脚带有原因。 |
UserInfo | FVGSDKUserInfo | 已登录的玩家。字段请参阅 FVGSDKUserInfo。失败时为默认构造的空值。 |
Error | FVGSDKError | Success 为 false 时的失败原因,带有 Code 与 Message。请参阅 Unreal 插件错误码。 |
Log out
AndroidiOSWindowsSigns the current player out and clears the stored session.
將目前的玩家登出並清除已儲存的工作階段。
将当前玩家登出并清除已保存的会话。
VGSDKWrapper::GetInstance()->Logout();Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Check the login session (server-side only)
Validates a player’s session from YOUR game server, not from the client. After a login callback hands the game a userID and a sessionID, the game’s backend POSTs them to /api/login/checkSession as application/x-www-form-urlencoded, and trusts the player only when returnCode is 1. There is no SDK call for this and no client-side equivalent: a client can claim any session, which is the reason the check exists. The domain to send it to and your game’s secret key are issued on request, see below.
從你的遊戲伺服器驗證玩家的工作階段,而不是從用戶端。登入回呼把 userID 與 sessionID 交給遊戲之後,遊戲的後端以 application/x-www-form-urlencoded 將兩者 POST 到 /api/login/checkSession,只有在 returnCode 為 1 時才信任該玩家。SDK 沒有對應的呼叫,用戶端也沒有等價做法:用戶端可以宣稱任何工作階段,這正是需要這道檢查的原因。要送往的網域與你的遊戲 secret key 需另行申請,見下方說明。
从你的游戏服务器验证玩家的会话,而不是从客户端。登录回调把 userID 与 sessionID 交给游戏之后,游戏的后端以 application/x-www-form-urlencoded 将两者 POST 到 /api/login/checkSession,只有在 returnCode 为 1 时才信任该玩家。SDK 没有对应的调用,客户端也没有等价做法:客户端可以声称任何会话,这正是需要这道检查的原因。要发往的域名与你的游戏 secret key 需另行申请,见下方说明。
# Domain and secret key come from your server's environment, never from a literal.
TIMESTAMP=$(date +%s)
SIG=$(printf '%s%s%s%s%s' "$VGA_SECRET_KEY" "$GAME_ID" "$USER_ID" "$TIMESTAMP" "$SESSION_ID" | md5sum | cut -d' ' -f1)
curl -X POST "$VGA_DOMAIN/api/login/checkSession" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "gameID=$GAME_ID" \
--data-urlencode "userID=$USER_ID" \
--data-urlencode "sessionID=$SESSION_ID" \
--data-urlencode "timestamp=$TIMESTAMP" \
--data-urlencode "sig=$SIG"Server-side only. The path is
/api/login/checkSession, but the DOMAIN and your game’s secret key are not published here. Email pin.sdk.dev@vng.com.vn to be issued both. The secret key must never ship in a game client.
僅限伺服器端。 路徑為
/api/login/checkSession,但網域與你的遊戲 secret key 不會公開在這裡,請來信 pin.sdk.dev@vng.com.vn 索取。secret key 絕對不可以隨遊戲用戶端一起發布。
仅限服务器端。 路径为
/api/login/checkSession,但域名与你的游戏 secret key 不会公开在这里,请来信 pin.sdk.dev@vng.com.vn 索取。secret key 绝对不可以随游戏客户端一起发布。
Input
輸入
输入
| Field | Type | Description |
|---|---|---|
userID | string | Unique VNGGames user id. |
sessionID | string | Session token used to authenticate backend calls. |
gameID | string | A VNGGames Account credential the SDK reads. |
timestamp | string | Unix time in SECONDS at the moment of the call. |
sig | string | Checksum over the other parameters: md5(secretKey + gameID + userID + timestamp + sessionID). The secret key is issued to your team and lives server-side only, which is what keeps this call off the client. |
| 欄位 | 型別 | 說明 |
|---|---|---|
userID | string | VNGGames 唯一使用者 ID。 |
sessionID | string | 用於驗證後端呼叫的工作階段權杖。 |
gameID | string | SDK 會讀取的 VNGGames Account 憑證。 |
timestamp | string | 發出呼叫當下的 Unix 時間,單位為「秒」。 |
sig | string | 其餘參數的檢查碼:md5(secretKey + gameID + userID + timestamp + sessionID)。secret key 由 SDK 團隊發給你的團隊,且只存在於伺服器端,這正是這個呼叫不能放在用戶端的原因。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userID | string | VNGGames 唯一用户 ID。 |
sessionID | string | 用于验证后端调用的会话令牌。 |
gameID | string | SDK 会读取的 VNGGames Account 凭据。 |
timestamp | string | 发出调用当下的 Unix 时间,单位为「秒」。 |
sig | string | 其余参数的校验和:md5(secretKey + gameID + userID + timestamp + sessionID)。secret key 由 SDK 团队发给你的团队,且只存在于服务器端,这正是这个调用不能放在客户端的原因。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
returnCode | int | Treat anything other than 1 as not signed in.• 1 the session is valid.• -1 bad sig.• -2 bad parameter.• -108 the session does not exist.• -404 unknown endpoint.• -500 service error. |
message | string | Human-readable result, for your server logs rather than for players. |
data | null | Always null on this endpoint. The verdict is returnCode. |
| 欄位 | 型別 | 說明 |
|---|---|---|
returnCode | int | 只要不是 1,一律視為未登入。• 1 工作階段有效。• -1 sig 有誤。• -2 參數有誤。• -108 工作階段不存在。• -404 端點不存在。• -500 服務錯誤。 |
message | string | 可讀的結果訊息,用於你的伺服器紀錄,而不是顯示給玩家。 |
data | null | 這個端點永遠回傳 null,判定結果看 returnCode。 |
| 字段 | 类型 | 描述 |
|---|---|---|
returnCode | int | 只要不是 1,一律视为未登录。• 1 会话有效。• -1 sig 有误。• -2 参数有误。• -108 会话不存在。• -404 端点不存在。• -500 服务错误。 |
message | string | 可读的结果消息,用于你的服务器日志,而不是显示给玩家。 |
data | null | 这个端点永远返回 null,判定结果看 returnCode。 |
LevelUp multiple accounts
Get account
WindowsRetrieves the player’s user information from the LevelUp Launcher. After the SDK has initialized and your game is ready to authenticate, call GetAccount to read the signed-in account from the launcher.
從 LevelUp Launcher 取得玩家的使用者資訊。在 SDK 初始化完成、且你的遊戲已準備好進行驗證後,呼叫 GetAccount 以從 Launcher 讀取已登入的帳號。
从 LevelUp Launcher 获取玩家的用户信息。在 SDK 初始化完成、且你的游戏已准备好进行验证后,调用 GetAccount 以从 Launcher 读取已登录的账号。
Recommended: block the game’s UI before you call this, so the player can’t accidentally interact with other game elements during the login process.
建議:在呼叫此方法之前先封鎖遊戲的 UI,讓玩家在登入過程中不會不小心與其他遊戲元素互動。
建议:在调用此方法之前先屏蔽游戏的 UI,让玩家在登录过程中不会不小心与其他游戏元素交互。
if (IVGSDKPlatformHelper* Helper = VGSDKWrapper::GetInstance()->GetAndroidHelper())
{
Helper->GetAccount(
[](const TVariant<FVGSDKUserInfo, FVGSDKError>& Result)
{
// Signed in with the Launcher's account, or Error on failure.
});
}Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
Success | bool | true when the player signed in. false means the Error pin carries the reason. |
UserInfo | FVGSDKUserInfo | The signed-in player. Fields: FVGSDKUserInfo. Default-constructed and empty on failure. |
Error | FVGSDKError | The failure reason when Success is false, carrying Code and Message. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Success | bool | 玩家登入成功時為 true。為 false 表示 Error 接腳帶有原因。 |
UserInfo | FVGSDKUserInfo | 已登入的玩家。欄位請參閱 FVGSDKUserInfo。失敗時為預設建構的空值。 |
Error | FVGSDKError | Success 為 false 時的失敗原因,帶有 Code 與 Message。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Success | bool | 玩家登录成功时为 true。为 false 表示 Error 引脚带有原因。 |
UserInfo | FVGSDKUserInfo | 已登录的玩家。字段请参阅 FVGSDKUserInfo。失败时为默认构造的空值。 |
Error | FVGSDKError | Success 为 false 时的失败原因,带有 Code 与 Message。请参阅 Unreal 插件错误码。 |
Select account
WindowsSwitches the active session to another of the player’s signed-in VNGGames accounts.
將使用中的工作階段切換到玩家另一個已登入的 VNGGames 帳號。
将使用中的会话切换到玩家另一个已登录的 VNGGames 账号。
if (IVGSDKPlatformHelper* Helper = VGSDKWrapper::GetInstance()->GetAndroidHelper())
{
Helper->SelectAccount(
[](const TVariant<FVGSDKUserInfo, FVGSDKError>& Result)
{
// Result carries the newly selected account.
});
}Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
Success | bool | true when the player signed in. false means the Error pin carries the reason. |
UserInfo | FVGSDKUserInfo | The signed-in player. Fields: FVGSDKUserInfo. Default-constructed and empty on failure. |
Error | FVGSDKError | The failure reason when Success is false, carrying Code and Message. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Success | bool | 玩家登入成功時為 true。為 false 表示 Error 接腳帶有原因。 |
UserInfo | FVGSDKUserInfo | 已登入的玩家。欄位請參閱 FVGSDKUserInfo。失敗時為預設建構的空值。 |
Error | FVGSDKError | Success 為 false 時的失敗原因,帶有 Code 與 Message。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Success | bool | 玩家登录成功时为 true。为 false 表示 Error 引脚带有原因。 |
UserInfo | FVGSDKUserInfo | 已登录的玩家。字段请参阅 FVGSDKUserInfo。失败时为默认构造的空值。 |
Error | FVGSDKError | Success 为 false 时的失败原因,带有 Code 与 Message。请参阅 Unreal 插件错误码。 |
In-App Purchase
Query the sellable products, then run a purchase through Google Play Billing / App Store In-App Purchase. Products and purchase status are delivered on listener closures.
查詢可販售的商品,然後透過 Google Play Billing/App Store In-App Purchase 執行購買。商品與購買狀態會透過監聽器閉包傳回。
先查询可售商品,然后通过 Google Play Billing / App Store In-App Purchase 执行购买。商品与购买状态在监听器闭包上返回。
Get products
AndroidiOSFetches the sellable products for a set of item ids.
為一組道具 ID 取得可販售的商品。
为一组物品 id 获取可售商品。
TArray<FString> ProductIds = { TEXT("item-1"), TEXT("item-2") };
VGSDKWrapper::GetInstance()->FetchPaymentProductList(ProductIds,
[](const TVariant<TArray<FVGSDKPaymentProduct>, FVGSDKError>& Result)
{
if (Result.IsType<TArray<FVGSDKPaymentProduct>>())
{
for (const FVGSDKPaymentProduct& Product : Result.Get<TArray<FVGSDKPaymentProduct>>())
{
// Show Product.DisplayPrice in your shop UI.
}
}
});Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
ProductIds | TArray<FString> | List of configured item id from Store. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
ProductIds | TArray<FString> | 在商店設定的商品 id 清單。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
ProductIds | TArray<FString> | 在商店配置的商品 id 列表。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
bSuccess | bool | true when the product list was fetched. |
Products | TArray<FVGSDKPaymentProduct> | The products found. Empty when no id matched. Each entry: FVGSDKPaymentProduct. |
Error | FVGSDKError | The failure reason when bSuccess is false. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
bSuccess | bool | 成功取得商品清單時為 true。 |
Products | TArray<FVGSDKPaymentProduct> | 找到的商品。沒有符合的 ID 時為空。每個項目:FVGSDKPaymentProduct。 |
Error | FVGSDKError | bSuccess 為 false 時的失敗原因。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
bSuccess | bool | 成功获取商品列表时为 true。 |
Products | TArray<FVGSDKPaymentProduct> | 找到的商品。没有匹配的 ID 时为空。每个条目:FVGSDKPaymentProduct。 |
Error | FVGSDKError | bSuccess 为 false 时的失败原因。请参阅 Unreal 插件错误码。 |
Purchase
AndroidiOSRuns a purchase and reports the outcome. Build the request with the purchase-info object: all fields required.
執行購買並回報結果。使用購買資訊物件建立請求: 所有欄位皆為必填。
执行购买并报告结果。使用购买信息对象构建请求: 所有字段均为必填。
FVGSDKPaymentInfo PaymentInfo;
PaymentInfo.UserID = TEXT("user-1");
PaymentInfo.ServerID = TEXT("server-1");
PaymentInfo.ItemID = TEXT("item-1");
PaymentInfo.RoleID = TEXT("role-1");
PaymentInfo.AppTransID = TEXT("txn-1");
PaymentInfo.Amount = 10000.0;
VGSDKWrapper::GetInstance()->Pay(PaymentInfo,
[]() { /* granted */ },
[]() { /* processing */ },
[]() { /* player canceled */ },
[](const FString& Message) { /* failed */ });Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
PaymentInfo | FVGSDKPaymentInfo | The purchase request. Full model: FVGSDKPaymentInfo. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
PaymentInfo | FVGSDKPaymentInfo | 購買請求。完整模型請參閱 FVGSDKPaymentInfo。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
PaymentInfo | FVGSDKPaymentInfo | 购买请求。完整模型请参阅 FVGSDKPaymentInfo。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
OnSuccess | FString | Purchase completed. |
OnProcessing | FString | Processing / verifying with Billing System. |
OnCancel | FString | Player canceled. |
OnFail | FString | Purchase failed. See billing / store payment error codes. |
Check item reward
AndroidReports whether the player has a reward waiting to be granted, so the game can show or hide the claim entry point.
回報玩家是否有待發放的獎勵,讓遊戲決定要顯示或隱藏領取入口。
报告玩家是否有待发放的奖励,让游戏决定要显示或隐藏领取入口。
Run this before Verify reward: it only reports availability and grants nothing by itself.
請先執行此檢查,再呼叫「驗證獎勵」。它只回報是否有獎勵,本身不會發放任何內容。
请先执行此检查,再调用“验证奖励”。它只报告是否有奖励,本身不会发放任何内容。
VGSDKWrapper::GetInstance()->CheckItemReward(
[](bool bIsHasReward)
{
if (bIsHasReward)
{
// Show the claim entry point, then call Verify reward.
}
},
[](const FString& Message) { /* check failed */ });Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
bIsHasReward | bool | true when the player has a reward waiting to be granted. |
Message | FString | On the failure pin, the reason the check could not complete. |
| 欄位 | 型別 | 說明 |
|---|---|---|
bIsHasReward | bool | 玩家有待發放的獎勵時為 true。 |
Message | FString | 在失敗接腳上,表示檢查無法完成的原因。 |
| 字段 | 类型 | 描述 |
|---|---|---|
bIsHasReward | bool | 玩家有待发放的奖励时为 true。 |
Message | FString | 在失败引脚上,表示检查无法完成的原因。 |
Verify reward
AndroidGrants the pending reward and reports whether a failure is worth retrying.
發放待領取的獎勵,並回報該次失敗是否值得重試。
发放待领取的奖励,并报告该次失败是否值得重试。
Call this only after Check item reward reports a pending reward.
請僅在「檢查道具獎勵」回報有待發放的獎勵之後才呼叫。
请仅在“检查道具奖励”报告有待发放的奖励之后才调用。
FVGSDKRewardInfo RewardInfo;
RewardInfo.UserID = TEXT("user-1");
RewardInfo.ServerID = TEXT("server-1");
RewardInfo.RoleID = TEXT("role-1");
RewardInfo.AppTransID = TEXT("txn-1");
VGSDKWrapper::GetInstance()->VerifyReward(RewardInfo,
[](const FString& Message) { /* granted */ },
[](const FString& Message) { /* retry later */ },
[](const FString& Message) { /* do not retry */ });Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
RewardInfo | FVGSDKRewardInfo | The reward claim. Full model: FVGSDKRewardInfo. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
RewardInfo | FVGSDKRewardInfo | 獎勵領取請求。完整模型請參閱 FVGSDKRewardInfo。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
RewardInfo | FVGSDKRewardInfo | 奖励领取请求。完整模型请参阅 FVGSDKRewardInfo。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
OnSuccess | FString | The reward was granted. |
OnFailRetry | FString | The grant failed in a way that is safe to retry with the same request. |
OnFailNonRetry | FString | The grant failed permanently. Do not retry with the same request. |
| 欄位 | 型別 | 說明 |
|---|---|---|
OnSuccess | FString | 獎勵已發放。 |
OnFailRetry | FString | 發放因暫時性問題失敗。以相同請求重試是安全的。 |
OnFailNonRetry | FString | 發放永久失敗。請勿以相同請求重試。 |
| 字段 | 类型 | 描述 |
|---|---|---|
OnSuccess | FString | 奖励已发放。 |
OnFailRetry | FString | 发放因临时性问题失败。以相同请求重试是安全的。 |
OnFailNonRetry | FString | 发放永久失败。请勿以相同请求重试。 |
Analytics
One facade for every analytics provider. The plugin exposes the custom-event calls only: Send a custom event, where you name the providers, and Misc: custom event, which sends to the SDK’s default provider set. The native SDKs’ structured use-case funnels (conversion rate, onboarding, main and daily activities, social and communities) have no plugin entry point, so report those moments as custom events of your own. Providers: AppsFlyer, Firebase, Data Platform, Facebook, CleverTap, ThinkingData. Every call is fire-and-forget. Every event also carries a set of default parameters the SDK fills in automatically: see Analytics default parameters.
Notice: Every event the VNGGames SDK APIs trigger starts with the
vgsdk_prefix and follows the formulavgsdk_{prefix}_{event name}: for example,vgsdk_af_app_open. See Analytics platform prefixes.
涵蓋所有分析供應商的單一門面。外掛僅提供自訂事件呼叫:Send a custom event 由你自行指定供應商,Misc: custom event 則傳送至 SDK 的預設供應商集合。原生 SDK 的結構化使用情境漏斗(conversion rate、onboarding、main and daily activities、social and communities)在外掛中沒有對應的進入點,因此請以你自己的自訂事件回報這些時機。供應商:AppsFlyer、Firebase、Data Platform、Facebook、CleverTap、ThinkingData。每個呼叫都是 fire-and-forget。每個事件還會帶有一組由 SDK 自動填入的預設參數: 請參閱 分析預設參數。
注意: VNGGames SDK API 觸發的每個事件都以
vgsdk_前綴開頭,並遵循vgsdk_{prefix}_{event name}公式: 例如vgsdk_af_app_open。請參閱 分析平台前綴。
面向所有分析提供方的统一门面。插件仅提供自定义事件调用:Send a custom event 由你自行指定提供方,Misc: custom event 则发送到 SDK 的默认提供方集合。原生 SDK 的结构化使用场景漏斗(conversion rate、onboarding、main and daily activities、social and communities)在插件中没有对应的入口,因此请用你自己的自定义事件回报这些时机。提供方:AppsFlyer、Firebase、Data Platform、Facebook、CleverTap、ThinkingData。每次调用都是 fire-and-forget。每个事件还会携带一组由 SDK 自动填充的默认参数: 请参阅 分析默认参数。
注意: VNGGames SDK API 触发的每个事件都以
vgsdk_前缀开头,并遵循公式vgsdk_{prefix}_{event name}: 例如vgsdk_af_app_open。请参阅 分析平台前缀。
Custom event
Send a custom event
AndroidiOSWindowsSends one custom event to the providers you explicitly choose via the platforms list. The event name is sent as-is: its natural name: apart from the optional per-provider prefix you set yourself. To send to the SDK’s default provider set without naming platforms, use miscCustomEvent instead.
將一個自訂事件傳送到你透過 platforms 清單明確選擇的供應商。事件名稱會原樣傳送: 使用其自然名稱: 除了你自行設定的可選每供應商前綴之外。若要在不指定平台的情況下傳送到 SDK 的預設供應商集合,請改用 miscCustomEvent。
向你通过 platforms 列表显式选择的提供方发送一个自定义事件。事件名称按原样(其自然名称)发送,仅带上你自行设置的可选的每提供方前缀。若要发送到 SDK 的默认提供方集合而不指定 platforms,请改用 miscCustomEvent。
On the Windows build target the native layer takes a provider bitmask that supports only
AppsFlyer,DataPlatformandThinkingData.Firebase,CleverTapare dropped while the mask is built. That is not an error, so the event still reaches the supported providers you listed and the others receive nothing.
在 Windows 建置目標上,原生層採用供應商位元遮罩,僅支援
AppsFlyer、DataPlatform與ThinkingData。Firebase、CleverTap會在建立遮罩時被略過。這並不算錯誤,因此事件仍會送達你列出的受支援供應商,其餘則收不到任何內容。
在 Windows 构建目标上,原生层采用提供方位掩码,仅支持
AppsFlyer、DataPlatform与ThinkingData。Firebase、CleverTap会在构建掩码时被跳过。这并不算错误,因此事件仍会送达你列出的受支持提供方,其余则收不到任何内容。
TMap<FString, FString> Parameters;
Parameters.Add(TEXT("level"), TEXT("10"));
TArray<FVGSDKAnalyticsPlatform> Platforms;
Platforms.Add(FVGSDKAnalyticsPlatform(EVGSDKAnalyticsProvider::AppsFlyer, TEXT("af")));
VGSDKWrapper::GetInstance()->SendCustomEvent(TEXT("level_up"), Parameters, Platforms);Input
輸入
输入
| Field | Type | Description |
|---|---|---|
EventName | FString | Event name. |
Parameters | TMap<FString, FString> | Event parameters. |
Platforms | TArray<FVGSDKAnalyticsPlatform> | Target providers. Each entry selects a provider + event-name prefix. |
Platforms[].Provider | EVGSDKAnalyticsProvider | Provider to send to: see VGSDKAnalyticsProvider. |
Platforms[].Prefix | FString | Prefix prepended to the event name for that provider. |
| 欄位 | 型別 | 說明 |
|---|---|---|
EventName | FString | 事件名稱。 |
Parameters | TMap<FString, FString> | 事件參數。 |
Platforms | TArray<FVGSDKAnalyticsPlatform> | 目標供應商。每個項目會選定一個供應商與事件名稱前綴。 |
Platforms[].Provider | EVGSDKAnalyticsProvider | 要傳送的目標供應商:請參閱 VGSDKAnalyticsProvider。 |
Platforms[].Prefix | FString | 為該供應商加在事件名稱前的前綴。 |
| 字段 | 类型 | 描述 |
|---|---|---|
EventName | FString | 事件名称。 |
Parameters | TMap<FString, FString> | 事件参数。 |
Platforms | TArray<FVGSDKAnalyticsPlatform> | 目标提供方。每个条目会选定一个提供方与事件名称前缀。 |
Platforms[].Provider | EVGSDKAnalyticsProvider | 要发送的目标提供方:请参阅 VGSDKAnalyticsProvider。 |
Platforms[].Prefix | FString | 为该提供方加在事件名称前的前缀。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Misc: custom event
AndroidiOSWindowsSends a custom event to the SDK’s default provider set: the no-platform-list counterpart of sendCustomEvent (you don’t pick providers). The SDK auto-prefixes the event name per provider, delivering it as vgsdk_{prefix}_{event name}: see Analytics platform prefixes.
將自訂事件傳送到 SDK 的預設供應商集合: 為 sendCustomEvent 不帶平台清單的對應版本(你不需選擇供應商)。SDK 會依各供應商自動為事件名稱加上前綴,以 vgsdk_{prefix}_{event name} 傳遞: 請參閱 分析平台前綴。
向 SDK 的默认提供方集合发送一个自定义事件: 即 sendCustomEvent 的无 platforms 列表版本(你不选择提供方)。SDK 会为每个提供方自动为事件名称添加前缀,以 vgsdk_{prefix}_{event name} 形式发送: 请参阅 分析平台前缀。
TMap<FString, FString> Parameters;
Parameters.Add(TEXT("level"), TEXT("10"));
VGSDKWrapper::GetInstance()->MiscCustomEvent(TEXT("level_up"), Parameters);Input
輸入
输入
| Field | Type | Description |
|---|---|---|
EventName | FString | Event name. |
Parameters | TMap<FString, FString> | Event parameters. |
| 欄位 | 型別 | 說明 |
|---|---|---|
EventName | FString | 事件名稱。 |
Parameters | TMap<FString, FString> | 事件參數。 |
| 字段 | 类型 | 描述 |
|---|---|---|
EventName | FString | 事件名称。 |
Parameters | TMap<FString, FString> | 事件参数。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Customer Support
Open the in-app support center, signed in and pre-filled with the player’s context. Results arrive on the listener’s closures.
開啟應用程式內的支援中心,已登入並預先填入玩家的情境資料。結果會透過監聽器的閉包傳回。
打开应用内客户支持中心,已登录并预填了玩家的上下文。结果在监听器的闭包上返回。
Open support center
AndroidiOSPresents the support center for the player.
為玩家顯示支援中心。
为玩家展示客户支持中心。
FCustomerSupportInfo SupportInfo;
SupportInfo.UserId = TEXT("user-1");
SupportInfo.ServerId = TEXT("server-1");
SupportInfo.RoleName = TEXT("role");
SupportInfo.Level = TEXT("10");
SupportInfo.Guild = TEXT("guild");
SupportInfo.LoginType = TEXT("GG");
SupportInfo.Content = TEXT("Need help");
VGSDKWrapper::GetInstance()->ShowCustomerSupport(SupportInfo,
[](const TVariant<bool, FVGSDKError>& Result) { });Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
Info | FCustomerSupportInfo | Player context. Full model: FCustomerSupportInfo. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
Info | FCustomerSupportInfo | 玩家情境。完整模型請參閱 FCustomerSupportInfo。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Info | FCustomerSupportInfo | 玩家上下文。完整模型请参阅 FCustomerSupportInfo。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
bSuccess | bool | true when the support center opened. |
Error | FVGSDKError | The failure reason when bSuccess is false. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
bSuccess | bool | 客服中心成功開啟時為 true。 |
Error | FVGSDKError | bSuccess 為 false 時的失敗原因。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
bSuccess | bool | 客服中心成功打开时为 true。 |
Error | FVGSDKError | bSuccess 为 false 时的失败原因。请参阅 Unreal 插件错误码。 |
Engage
Re-engagement, grouped by provider. CleverTap covers in-app messaging and the app inbox. Apollo messaging/inbox is backend-driven, so the client’s only touchpoint is the game context it targets on. Firebase Remote Config and the in-app WebView round it out. Firebase Cloud Messaging, local push, Apollo (push / in-app / inbox), and Firebase in-app messages are delivered server-side and expose no client call.
再行銷,依供應商分組。CleverTap 涵蓋應用程式內訊息與應用程式收件匣。Apollo 的訊息/收件匣由後端驅動,因此用戶端唯一的接觸點是它所鎖定的遊戲情境。Firebase Remote Config 與應用程式內 WebView 補足其餘部分。Firebase Cloud Messaging、本機推播、Apollo(推播/應用程式內/收件匣)以及 Firebase 應用程式內訊息皆由伺服器端傳遞,不提供任何用戶端呼叫。
按提供方分组的再互动能力。CleverTap 负责应用内消息和应用收件箱。Apollo 的消息 / 收件箱由后端驱动,因此客户端唯一的接触点是它所定位的游戏上下文。此外还有 Firebase Remote Config 和应用内 WebView。Firebase Cloud Messaging、本地推送、Apollo(推送 / 应用内 / 收件箱)以及 Firebase 应用内消息均由服务端下发,不暴露客户端调用。
Firebase
Fetch Firebase Remote Config
AndroidiOSFetches all remote-config keys.
取得所有 remote-config 鍵。
获取所有 remote-config 键。
VGSDKWrapper::GetInstance()->FetchFirebaseConfig(
[](const TVariant<TMap<FString, FString>, FVGSDKError>& Result)
{
if (Result.IsType<TMap<FString, FString>>())
{
const TMap<FString, FString>& Config = Result.Get<TMap<FString, FString>>();
// Read Config["your_key"]
}
});Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
bSuccess | bool | true when the fetch succeeded. |
ConfigData | FVGSDKConfigData | All remote-config keys and values. Blueprint receives the wrapper struct, whose ConfigMap holds the pairs. The C++ callback receives the TMap<FString, FString> directly. |
Error | FVGSDKError | The failure reason when bSuccess is false. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
bSuccess | bool | 取得成功時為 true。 |
ConfigData | FVGSDKConfigData | 所有遠端設定的鍵與值。Blueprint 收到的是包裝結構,其 ConfigMap 存放這些配對。C++ 回呼則直接收到 TMap<FString, FString>。 |
Error | FVGSDKError | bSuccess 為 false 時的失敗原因。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
bSuccess | bool | 获取成功时为 true。 |
ConfigData | FVGSDKConfigData | 所有远程配置的键与值。Blueprint 收到的是包装结构,其 ConfigMap 存放这些键值对。C++ 回调则直接收到 TMap<FString, FString>。 |
Error | FVGSDKError | bSuccess 为 false 时的失败原因。请参阅 Unreal 插件错误码。 |
In-App WebView
Show in-app WebView
AndroidiOSOpens a URL in an in-app WebView.
在應用程式內 WebView 中開啟一個 URL。
在应用内 WebView 中打开一个 URL。
VGSDKWrapper::GetInstance()->ShowWebView(TEXT("https://example.com"),
[](const TVariant<bool, FVGSDKError>& Result) { });Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
Url | FString | URL to load. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
Url | FString | 要載入的網址。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Url | FString | 要加载的网址。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
bSuccess | bool | true when the WebView opened. |
Error | FVGSDKError | The failure reason when bSuccess is false. See Unreal plugin error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
bSuccess | bool | WebView 成功開啟時為 true。 |
Error | FVGSDKError | bSuccess 為 false 時的失敗原因。請參閱 Unreal 外掛錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
bSuccess | bool | WebView 成功打开时为 true。 |
Error | FVGSDKError | bSuccess 为 false 时的失败原因。请参阅 Unreal 插件错误码。 |
Social
Read Facebook profile/friends and share to Facebook or Instagram. Facebook results are the raw Graph JSON (no typed model). Instagram callbacks return only an error (none = success).
讀取 Facebook 個人檔案/好友,並分享到 Facebook 或 Instagram。Facebook 的結果為原始的 Graph JSON(沒有型別化模型)。Instagram 的回呼僅傳回一個錯誤(不存在=成功)。
读取 Facebook 资料 / 好友,并分享到 Facebook 或 Instagram。Facebook 结果是原始的 Graph JSON(没有类型化模型)。Instagram 回调仅返回一个错误(不存在 = 成功)。
Share photo to Facebook
AndroidiOSShares a photo through the Facebook share dialog.
透過 Facebook 分享對話框分享相片。
通过 Facebook 分享对话框分享一张照片。
VGSDKWrapper::GetInstance()->ShareFacebookPhoto(Base64Image,
[](const FString& Message) { /* shared */ },
[](const FString& Message) { /* failed */ },
[]() { /* canceled */ });Input
輸入
输入
| Field | Type | Description |
|---|---|---|
WorldContext | UObject* | Blueprint only: the node’s World Context pin, normally wired from Self. The C++ entry points take no world context. |
Base64Image | FString | The photo to share, encoded as a Base64 string. The plugin decodes it to a native image before handing it to the Facebook share dialog. |
| 欄位 | 型別 | 說明 |
|---|---|---|
WorldContext | UObject* | 僅限 Blueprint:節點的 World Context 接腳,通常由 Self 連入。C++ 進入點不需要 world context。 |
Base64Image | FString | 要分享的照片,以 Base64 字串編碼。外掛會先解碼為原生影像,再交給 Facebook 分享對話框。 |
| 字段 | 类型 | 描述 |
|---|---|---|
WorldContext | UObject* | 仅限 Blueprint:节点的 World Context 引脚,通常由 Self 连入。C++ 入口点不需要 world context。 |
Base64Image | FString | 要分享的照片,以 Base64 字符串编码。插件会先解码为原生图像,再交给 Facebook 分享对话框。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
OnSuccess | FString | The photo was shared. |
OnFail | FString | The share failed, with the reason. |
OnCancel | (no parameters) | The player dismissed the share dialog. |
| 欄位 | 型別 | 說明 |
|---|---|---|
OnSuccess | FString | 相片已分享。 |
OnFail | FString | 分享失敗,並附上原因。 |
OnCancel | (no parameters) | 玩家關閉了分享對話框。 |
| 字段 | 类型 | 描述 |
|---|---|---|
OnSuccess | FString | 照片已分享。 |
OnFail | FString | 分享失败,并附上原因。 |
OnCancel | (no parameters) | 玩家关闭了分享对话框。 |
User Experience
Native store rating prompt and in-chat Google Translate.
原生商店評分提示與聊天內的 Google Translate。
原生商店评分提示,以及聊天内的 Google Translate。
Store rating (in-app review)
AndroidiOSTriggers the native in-app review sheet (subject to the OS’s display limits).
觸發原生應用程式內評論表單(受作業系統的顯示限制約束)。
触发原生应用内评价面板(受操作系统的展示限制约束)。
VGSDKWrapper::GetInstance()->Rating();Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
SDK Information
Read-only accessors for SDK, device, and current-user information: SDK version, active language, detected country, device id, and the signed-in user. All are static accessors. None take input.
用於讀取 SDK、裝置與目前使用者資訊的唯讀存取器: SDK 版本、使用中的語言、偵測到的國家/地區、裝置 ID,以及已登入的使用者。全部皆為靜態存取器。均不需輸入。
SDK、设备与当前用户信息的只读访问器: SDK 版本、当前语言、检测到的国家 / 地区、设备 id 以及已登录的用户。它们都是静态访问器。均不接受输入。
Get current user
AndroidiOSWindowsReturns the signed-in user, or none when no session exists.
傳回已登入的使用者。若不存在工作階段則為無。
返回已登录的用户,若不存在会话则为无。
const FVGSDKUserInfo User = VGSDKWrapper::GetInstance()->GetCurrentUserInfo();
if (!User.UserId.IsEmpty())
{
// Signed in.
}Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
UserInfo | FVGSDKUserInfo | The signed-in user, or absent when no session exists. Fields: FVGSDKUserInfo. Returns a default-constructed struct with an empty UserId when no session exists. |
| 欄位 | 型別 | 說明 |
|---|---|---|
UserInfo | FVGSDKUserInfo | 已登入的使用者,若無工作階段則為空。欄位請參閱 FVGSDKUserInfo。沒有工作階段時,會回傳 UserId 為空字串的預設結構。 |
| 字段 | 类型 | 描述 |
|---|---|---|
UserInfo | FVGSDKUserInfo | 已登录的用户,若无会话则为空。字段请参阅 FVGSDKUserInfo。没有会话时,会返回 UserId 为空字符串的默认结构。 |
Data Models
Shared objects and enums referenced by multiple methods, documented once here. For enums, each row is one case: Field = the case, Type = its raw value.
由多個方法參考的共用物件與列舉,於此處統一說明一次。對於列舉,每一列代表一個 case: Field=該 case,Type=其原始值。
被多个方法引用的共享对象与枚举,在此统一记录一次。对于枚举,每一行是一个枚举项: Field = 该枚举项,Type = 其原始值。
VGSDKAnalyticsProvider
Analytics provider selector for sendCustomEvent (Int enum).
sendCustomEvent 的分析供應商選擇器(Int 列舉)。
sendCustomEvent 的分析提供方选择器(Int 枚举)。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
AppsFlyer | 0 | AppsFlyer. |
Firebase | 1 | Firebase Analytics. |
DataPlatform | 2 | VNGGames Data Platform. |
Facebook | 3 | Facebook App Events. |
ThinkingData | 4 | ThinkingData. |
CleverTap | 5 | CleverTap. |
Unknown | 6 | Default value on a default-constructed FVGSDKAnalyticsPlatform. Set a real provider before sending. |
| 欄位 | 型別 | 說明 |
|---|---|---|
AppsFlyer | 0 | AppsFlyer。 |
Firebase | 1 | Firebase Analytics。 |
DataPlatform | 2 | VNGGames Data Platform。 |
Facebook | 3 | Facebook App Events。 |
ThinkingData | 4 | ThinkingData。 |
CleverTap | 5 | CleverTap。 |
Unknown | 6 | 預設建構的 FVGSDKAnalyticsPlatform 上的預設值。傳送前請先設定實際的供應商。 |
| 字段 | 类型 | 描述 |
|---|---|---|
AppsFlyer | 0 | AppsFlyer。 |
Firebase | 1 | Firebase Analytics。 |
DataPlatform | 2 | VNGGames 数据平台。 |
Facebook | 3 | Facebook App Events。 |
ThinkingData | 4 | ThinkingData。 |
CleverTap | 5 | CleverTap。 |
Unknown | 6 | 默认构造的 FVGSDKAnalyticsPlatform 上的默认值。发送前请先设置实际的提供方。 |
Analytics default parameters
The default parameters the analytics facade merges into every event it triggers. The SDK fills them automatically: you never set them, and each method’s own inputs and any extraData you pass are added on top. device_info, user_info, response_info, and login_info are JSON-encoded strings. The last two are conditional: see their rows. Used by every method in Analytics.
分析門面合併到它所觸發之每個事件的預設參數。SDK 會自動填入: 你永遠不需設定。每個方法自身的輸入以及你傳入的任何 extraData 會再疊加於其上。device_info、user_info、response_info 與 login_info 為 JSON 編碼字串。後兩者為條件性: 請參閱其對應列。由 分析 中的每個方法使用。
分析门面合并到它触发的每个事件中的默认参数。SDK 会自动填充它们: 你无需设置。每个方法自身的输入以及你传入的任何 extraData 都会叠加在其之上。device_info、user_info、response_info 和 login_info 是 JSON 编码的字符串。后两个是条件性的: 见其对应行。分析 中的每个方法都会使用它们。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
device_info | String | Device info, JSON-encoded: os (the platform name), version (OS version), model (device model). |
device_id | String | Per-device id (advertising id when available, otherwise a fallback device id, prefixed). |
game_version | String | Full game (app) version. |
sdk_version | String | VNGGames SDK version. |
package | String | Game bundle id / package name. |
network_type | String | Active network type at send time. |
timestamp | String | Event time, in milliseconds. |
session_id | String | Analytics session id: a UUID generated once per app run. |
user_info | String | Signed-in user info, JSON-encoded: user_id, social_id, country_code. Ids are empty while signed out. |
appsflyer_id | String | AppsFlyer device UID. |
frb_installation_id | String | Firebase installation id. |
frb_app_instance_id | String | Firebase app-instance id. |
response_info | String | Added only on events that report an outcome. JSON-encoded: status (Success / Failed / Canceled), error_code, remote (0 local, 1 remote). |
login_info | String | Added only on login-flow events. JSON-encoded: method, channel, flow (CreateUser / UpdateUser), step. |
| 欄位 | 型別 | 說明 |
|---|---|---|
device_info | String | 裝置資訊,JSON 編碼:os(平台名稱)、version(作業系統版本)、model(裝置型號)。 |
device_id | String | 每台裝置的 ID(可用時為廣告 ID,否則為備用裝置 ID。含前綴)。 |
game_version | String | 完整的遊戲(應用程式)版本。 |
sdk_version | String | VNGGames SDK 版本。 |
package | String | 遊戲的 bundle id/套件名稱。 |
network_type | String | 傳送當下使用中的網路類型。 |
timestamp | String | 事件時間,以毫秒為單位。 |
session_id | String | 分析工作階段 ID: 每次應用程式執行時產生一次的 UUID。 |
user_info | String | 已登入使用者資訊,JSON 編碼:user_id、social_id、country_code。登出時這些 ID 為空。 |
appsflyer_id | String | AppsFlyer 裝置 UID。 |
frb_installation_id | String | Firebase 安裝 ID。 |
frb_app_instance_id | String | Firebase 應用程式執行個體 ID。 |
response_info | String | 僅在回報結果的事件上加入。JSON 編碼:status(Success/Failed/Canceled)、error_code、remote(0 本機、1 遠端)。 |
login_info | String | 僅在登入流程事件上加入。JSON 編碼:method、channel、flow(CreateUser/UpdateUser)、step。 |
| 字段 | 类型 | 描述 |
|---|---|---|
device_info | String | 设备信息,JSON 编码:os(平台名称)、version(操作系统版本)、model(设备型号)。 |
device_id | String | 每设备 id(可用时为广告 id,否则为备用设备 id。带前缀)。 |
game_version | String | 完整的游戏(应用)版本。 |
sdk_version | String | VNGGames SDK 版本。 |
package | String | 游戏 bundle id / 包名。 |
network_type | String | 发送时的当前网络类型。 |
timestamp | String | 事件时间,以毫秒为单位。 |
session_id | String | 分析会话 id: 每次应用运行生成一次的 UUID。 |
user_info | String | 已登录用户信息,JSON 编码:user_id、social_id、country_code。未登录时这些 id 为空。 |
appsflyer_id | String | AppsFlyer 设备 UID。 |
frb_installation_id | String | Firebase 安装 id。 |
frb_app_instance_id | String | Firebase 应用实例 id。 |
response_info | String | 仅在报告结果的事件上添加。JSON 编码:status(Success / Failed / Canceled)、error_code、remote(0 本地,1 远程)。 |
login_info | String | 仅在登录流程事件上添加。JSON 编码:method、channel、flow(CreateUser / UpdateUser)、step。 |
Analytics platform prefixes
The per-provider prefix the VNGGames SDK inserts into every event it triggers: each event reaches its provider as vgsdk_{prefix}_{event name} (for example, vgsdk_af_app_open). Used by every method in Analytics.
VNGGames SDK 插入到它所觸發之每個事件中的各供應商前綴: 每個事件會以 vgsdk_{prefix}_{event name} 抵達其供應商(例如 vgsdk_af_app_open)。由 分析 中的每個方法使用。
VNGGames SDK 插入到它触发的每个事件中的每提供方前缀: 每个事件以 vgsdk_{prefix}_{event name} 形式到达其提供方(例如 vgsdk_af_app_open)。分析 中的每个方法都会使用它。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
Firebase | frb | Firebase Analytics. |
Facebook | fb | Facebook App Events. |
AppsFlyer | af | AppsFlyer. |
Data Platform | dp | VNGGames Data Platform. |
CleverTap | clt | CleverTap. |
ThinkingData | td | ThinkingData. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Firebase | frb | Firebase Analytics。 |
Facebook | fb | Facebook App Events。 |
AppsFlyer | af | AppsFlyer。 |
Data Platform | dp | VNGGames Data Platform。 |
CleverTap | clt | CleverTap。 |
ThinkingData | td | ThinkingData。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Firebase | frb | Firebase Analytics。 |
Facebook | fb | Facebook App Events。 |
AppsFlyer | af | AppsFlyer。 |
Data Platform | dp | VNGGames 数据平台。 |
CleverTap | clt | CleverTap。 |
ThinkingData | td | ThinkingData。 |
FVGSDKUserInfo
The signed-in player, delivered by every login callback and by the current-user accessor.
由每個登入回呼以及目前使用者存取器傳回的使用者物件。
由每个登录回调以及当前用户访问器返回的用户对象。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
UserId | FString | Unique VNGGames user id. |
SessionId | FString | Session token used to authenticate backend calls. |
SocialId | FString | Channel-side social account id. |
OpenId | FString | Per-game open id for the signed-in account. |
Oauthen | FString | OAuth token issued for the session. |
DisplayName | FString | Player display name. |
LoginChannel | FVGSDKLoginChannel | Channel the player signed in with. See FVGSDKLoginChannel. |
LoginChannelString | FString | The login channel as a string. |
Email | FString | Email address when the channel provides one. |
ProtectedStatus | bool | Whether the account is protected/secured. |
LastUpdateSession | int | Epoch seconds of the last session refresh. |
AvatarUrl | FString | Profile picture URL. Populated on the Windows build target only, and empty on Android and iOS. |
LoginPlatform | FString | Name of the platform the session was created on. Populated on the Windows build target only, and empty on Android and iOS. |
| 欄位 | 型別 | 說明 |
|---|---|---|
UserId | FString | 唯一的 VNGGames 使用者 ID。 |
SessionId | FString | 用於驗證後端呼叫的工作階段權杖。 |
SocialId | FString | 頻道端的社群帳號 ID。 |
OpenId | FString | 已登入帳號在此遊戲中的 open ID。 |
Oauthen | FString | 本次工作階段核發的 OAuth 權杖。 |
DisplayName | FString | 玩家顯示名稱。 |
LoginChannel | FVGSDKLoginChannel | 玩家登入所使用的頻道。請參閱 FVGSDKLoginChannel。 |
LoginChannelString | FString | 以字串表示的登入頻道。 |
Email | FString | 頻道有提供時的電子郵件地址。 |
ProtectedStatus | bool | 帳號是否已受保護。 |
LastUpdateSession | int | 最近一次更新工作階段的時間。 |
AvatarUrl | FString | 個人頭像網址。僅在 Windows 建置目標上有值,在 Android 與 iOS 上為空字串。 |
LoginPlatform | FString | 建立此工作階段的平台名稱。僅在 Windows 建置目標上有值,在 Android 與 iOS 上為空字串。 |
| 字段 | 类型 | 描述 |
|---|---|---|
UserId | FString | 唯一的 VNGGames 用户 ID。 |
SessionId | FString | 用于验证后端调用的会话令牌。 |
SocialId | FString | 渠道端的社交账号 ID。 |
OpenId | FString | 已登录账号在本游戏中的 open ID。 |
Oauthen | FString | 本次会话签发的 OAuth 令牌。 |
DisplayName | FString | 玩家显示名称。 |
LoginChannel | FVGSDKLoginChannel | 玩家登录所使用的渠道。请参阅 FVGSDKLoginChannel。 |
LoginChannelString | FString | 以字符串表示的登录渠道。 |
Email | FString | 渠道提供时的电子邮件地址。 |
ProtectedStatus | bool | 账号是否已受保护。 |
LastUpdateSession | int | 最近一次更新会话的时间。 |
AvatarUrl | FString | 头像地址。仅在 Windows 构建目标上有值,在 Android 与 iOS 上为空字符串。 |
LoginPlatform | FString | 创建该会话的平台名称。仅在 Windows 构建目标上有值,在 Android 与 iOS 上为空字符串。 |
FVGSDKLoginChannel
Login channel the player signed in with. Unlike the other platforms’ plain enums this is a struct pairing a numeric Value with a short string Type, and the Field / Type columns below are those two values. FromValue and FromType look a channel up and fall back to Unknown.
玩家登入所使用的頻道。與其他平台的單純列舉不同,這是一個結構,將數值 Value 與短字串 Type 配成一組,下表的「欄位」與「型別」兩欄即為這兩個值。FromValue 與 FromType 用於查詢頻道,查不到時會回傳 Unknown。
玩家登录所使用的渠道。与其他平台的普通枚举不同,这是一个结构体,将数值 Value 与短字符串 Type 配成一组,下表的“字段”与“类型”两列即为这两个值。FromValue 与 FromType 用于查询渠道,查不到时会返回 Unknown。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
Facebook | 1 | Facebook. Type is FB. |
Google | 3 | Google. Type is GG. |
ZingID | 4 | Zing ID. Type is ZM. |
Guest | 5 | Anonymous guest. Type is GU. |
Apple | 7 | Sign in with Apple. Type is AP. |
Email | 8 | Email. Type is EM. |
GGID | 10 | GGID. Type is GGID. |
Phone | 11 | Phone number. Type is PH. |
Unknown | 0 | No channel resolved. Type is Unknown, and both lookups fall back to this. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Facebook | 1 | Facebook。Type 為 FB。 |
Google | 3 | Google。Type 為 GG。 |
ZingID | 4 | Zing ID。Type 為 ZM。 |
Guest | 5 | 匿名訪客。Type 為 GU。 |
Apple | 7 | 透過 Apple 登入。Type 為 AP。 |
Email | 8 | 電子郵件。Type 為 EM。 |
GGID | 10 | GGID。Type 為 GGID。 |
Phone | 11 | 手機號碼。Type 為 PH。 |
Unknown | 0 | 未解析出任何頻道。Type 為 Unknown,兩種查詢方式都會退回此值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Facebook | 1 | Facebook。Type 为 FB。 |
Google | 3 | Google。Type 为 GG。 |
ZingID | 4 | Zing ID。Type 为 ZM。 |
Guest | 5 | 匿名访客。Type 为 GU。 |
Apple | 7 | 通过 Apple 登录。Type 为 AP。 |
Email | 8 | 电子邮件。Type 为 EM。 |
GGID | 10 | GGID。Type 为 GGID。 |
Phone | 11 | 手机号码。Type 为 PH。 |
Unknown | 0 | 未解析出任何渠道。Type 为 Unknown,两种查询方式都会回退到此值。 |
FVGSDKPaymentProduct
A sellable product returned by Get products.
由「取得商品」傳回的可販售商品。
由“获取商品”返回的可售卖商品。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
ProductId | FString | The configured item id from Store. |
Type | FString | Store product type. |
Price | FString | Price as reported by the store, as a string. |
DisplayPrice | FString | Store-formatted price string to show the player. |
PriceMicros | FString | Price in micro-units, as a string: 1,000,000 = one currency unit. |
Currency | FString | ISO currency code. |
CurrencySymbol | FString | Currency symbol for the price. |
Title | FString | Store product title. |
Description | FString | Store product description. |
| 欄位 | 型別 | 說明 |
|---|---|---|
ProductId | FString | 在商店設定的商品 id。 |
Type | FString | 商店商品類型。 |
Price | FString | 商店回報的價格,以字串表示。 |
DisplayPrice | FString | 商店格式化後、用於向玩家顯示的價格字串。 |
PriceMicros | FString | 以百萬分之一為單位的價格,以字串表示:1,000,000 等於一個 currency 單位。 |
Currency | FString | ISO 貨幣代碼。 |
CurrencySymbol | FString | 價格所用的貨幣符號。 |
Title | FString | 商店商品標題。 |
Description | FString | 商店商品說明。 |
| 字段 | 类型 | 描述 |
|---|---|---|
ProductId | FString | 在商店配置的商品 id。 |
Type | FString | 商店商品类型。 |
Price | FString | 商店返回的价格,以字符串表示。 |
DisplayPrice | FString | 商店格式化后、用于向玩家展示的价格字符串。 |
PriceMicros | FString | 以百万分之一为单位的价格,以字符串表示:1,000,000 等于一个 currency 单位。 |
Currency | FString | ISO 货币代码。 |
CurrencySymbol | FString | 价格所用的货币符号。 |
Title | FString | 商店商品标题。 |
Description | FString | 商店商品说明。 |
FVGSDKPaymentInfo
The purchase request passed to Purchase.
傳入「購買」的購買請求。
传入“购买”的购买请求。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
UserID | FString | Buyer’s VNGGames user id. |
ServerID | FString | Game server id. |
ItemID | FString | The configured item id from Store. |
RoleID | FString | Character/role id. |
AppTransID | FString | Your app-side transaction id, for reconciliation. |
AppTxID | FString | Secondary app-side transaction id, passed through to the billing system. |
AddInfo | FString | Extra passthrough data. Empty string when unused. |
Amount | double | Purchase amount. Defaults to 0.0. |
ItemDisplayName | FString | Item name to show in the purchase UI. |
Description | FString | Purchase description. |
ClientKey | FString | Optional signing key. Leave empty unless your integration requires it. |
SecretKey | FString | Optional signing secret. Leave empty unless your integration requires it. |
| 欄位 | 型別 | 說明 |
|---|---|---|
UserID | FString | 購買者的 VNGGames 使用者 ID。 |
ServerID | FString | 遊戲伺服器 ID。 |
ItemID | FString | 在商店設定的商品 id。 |
RoleID | FString | 角色 ID。 |
AppTransID | FString | 你的應用程式端交易 ID,用於對帳。 |
AppTxID | FString | 次要的應用程式端交易 ID,會一併傳遞給計費系統。 |
AddInfo | FString | 額外的傳遞資料。未使用時請傳入空字串。 |
Amount | double | 購買金額。預設為 0.0。 |
ItemDisplayName | FString | 在購買介面中顯示的道具名稱。 |
Description | FString | 購買說明。 |
ClientKey | FString | 選填的簽章金鑰。除非你的整合需要,否則請留空。 |
SecretKey | FString | 選填的簽章密鑰。除非你的整合需要,否則請留空。 |
| 字段 | 类型 | 描述 |
|---|---|---|
UserID | FString | 购买者的 VNGGames 用户 ID。 |
ServerID | FString | 游戏服务器 ID。 |
ItemID | FString | 在商店配置的商品 id。 |
RoleID | FString | 角色 ID。 |
AppTransID | FString | 你的应用端交易 ID,用于对账。 |
AppTxID | FString | 次要的应用端交易 ID,会一并传递给计费系统。 |
AddInfo | FString | 额外的透传数据。未使用时请传入空字符串。 |
Amount | double | 购买金额。默认为 0.0。 |
ItemDisplayName | FString | 在购买界面中显示的道具名称。 |
Description | FString | 购买说明。 |
ClientKey | FString | 选填的签名密钥。除非你的集成需要,否则请留空。 |
SecretKey | FString | 选填的签名密钥。除非你的集成需要,否则请留空。 |
FVGSDKRewardInfo
The reward claim passed to Verify reward.
傳入「驗證獎勵」的獎勵領取請求。
传入“验证奖励”的奖励领取请求。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
UserID | FString | Buyer’s VNGGames user id. |
ServerID | FString | Game server id. |
RoleID | FString | Character/role id. |
AppTransID | FString | Your app-side transaction id, for reconciliation. |
AddInfo | FString | Extra passthrough data. Empty string when unused. |
| 欄位 | 型別 | 說明 |
|---|---|---|
UserID | FString | 購買者的 VNGGames 使用者 ID。 |
ServerID | FString | 遊戲伺服器 ID。 |
RoleID | FString | 角色 ID。 |
AppTransID | FString | 你的應用程式端交易 ID,用於對帳。 |
AddInfo | FString | 額外的傳遞資料。未使用時請傳入空字串。 |
| 字段 | 类型 | 描述 |
|---|---|---|
UserID | FString | 购买者的 VNGGames 用户 ID。 |
ServerID | FString | 游戏服务器 ID。 |
RoleID | FString | 角色 ID。 |
AppTransID | FString | 你的应用端交易 ID,用于对账。 |
AddInfo | FString | 额外的透传数据。未使用时请传入空字符串。 |
FCustomerSupportInfo
Player context passed to Open support center.
傳入「開啟客服中心」的玩家情境。
传入“打开客服中心”的玩家上下文。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
UserId | FString | Unique VNGGames user id. |
LoginType | FString | Login channel as a string, for example GG. |
RoleName | FString | Character/role name. |
Level | FString | Player level. |
Guild | FString | Guild name. |
ServerId | FString | Game server id. |
Content | FString | Pre-filled ticket content. |
| 欄位 | 型別 | 說明 |
|---|---|---|
UserId | FString | 唯一的 VNGGames 使用者 ID。 |
LoginType | FString | 以字串表示的登入頻道,例如 GG。 |
RoleName | FString | 角色名稱。 |
Level | FString | 玩家等級。 |
Guild | FString | 公會名稱。 |
ServerId | FString | 遊戲伺服器 ID。 |
Content | FString | 預先填入的工單內容。 |
| 字段 | 类型 | 描述 |
|---|---|---|
UserId | FString | 唯一的 VNGGames 用户 ID。 |
LoginType | FString | 以字符串表示的登录渠道,例如 GG。 |
RoleName | FString | 角色名称。 |
Level | FString | 玩家等级。 |
Guild | FString | 公会名称。 |
ServerId | FString | 游戏服务器 ID。 |
Content | FString | 预填的工单内容。 |
Error Codes
On Unreal a failure arrives as an FVGSDKError whose Code is a STRING, not a number. It is either one of the plugin’s own codes, listed under Unreal plugin codes below, or the underlying native SDK’s code forwarded verbatim. That is why the numeric bands below still apply: on the Android and iOS build targets a game really does receive those values, as strings.
在 Unreal 上,失敗會以 FVGSDKError 回傳,其 Code 是字串而非數字。它可能是外掛本身的代碼(見下方的 Unreal 外掛代碼),也可能是原封不動轉傳的原生 SDK 代碼。這也是下方數字區段依然適用的原因:在 Android 與 iOS 建置目標上,遊戲確實會收到這些值,只是以字串形式呈現。
在 Unreal 上,失败会以 FVGSDKError 返回,其 Code 是字符串而非数字。它可能是插件本身的代码(见下方的 Unreal 插件代码),也可能是原封不动转发的原生 SDK 代码。这也是下方数字区段依然适用的原因:在 Android 与 iOS 构建目标上,游戏确实会收到这些值,只是以字符串形式呈现。
Auth: VGA / OAuth (7xxx)
VGA (VNGGames Account) / OAuth login errors, delivered as an error. These back the VGA login flows. iOS/Android differ: both share the 7005 to 7020 OAuth codes, but elsewhere the endpoints diverge: on Android user-cancel is 7002 (USER_CANCEL, the legacy build flavor reports 9003 on its cancel-login path), 7003 is LOGIN_FAILED, and 7021 is account-already-bound (QUICK_LOGIN_ACCOUNT_BOUND). iOS instead uses 7001 for cancel and 7021 for validateAccessTokenNullResult, and defines 7022 至 7027 (null-result and quick-login cases) that Android does not.
VGA(VNGGames Account)/OAuth 登入錯誤,以錯誤傳回。這些支撐 VGA 登入流程。iOS 與 Android 有差異:兩者共用 7005 至 7020 的 OAuth 代碼,但其他端點有所分歧: 在 Android 上,玩家取消為 7002(USER_CANCEL,legacy 建置風味在其取消登入路徑回報 9003),7003 為 LOGIN_FAILED,而 7021 為帳號已綁定(QUICK_LOGIN_ACCOUNT_BOUND)。iOS 則以 7001 表示取消、以 7021 表示 validateAccessTokenNullResult,並定義了 Android 沒有的 7022 至 7027(未傳回結果與快速登入的情形)。
VGA(VNGGames Account)/ OAuth 登录错误,以错误形式返回。它们支撑 VGA 登录流程。iOS 与 Android 存在差异:两者共用 7005 至 7020 的 OAuth 代码,但其他端点有所分歧: 在 Android 上,玩家取消为 7002(USER_CANCEL,legacy 构建风味在其取消登录路径返回 9003),7003 为 LOGIN_FAILED,而 7021 为账号已绑定(QUICK_LOGIN_ACCOUNT_BOUND)。iOS 则以 7001 表示取消、以 7021 表示 validateAccessTokenNullResult,并定义了 Android 没有的 7022 至 7027(未返回结果与快速登录的情形)。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
7000 | undefined | Unmapped GGID / OAuth error (fallback). |
7001 | cancelLogin | Player canceled login. |
7005 | invalidRequest | OAuth invalid_request. |
7006 | invalidClient | OAuth invalid_client. |
7007 | invalidGrant | OAuth invalid_grant. |
7008 | invalidScope | OAuth invalid_scope. |
7009 | unsupportedResponseType | OAuth unsupported_response_type. |
7010 | unsupportedGrantType | OAuth unsupported_grant_type. |
7011 | unauthorizedClient | OAuth unauthorized_client. |
7012 | unauthorizedCode | OAuth unauthorized_code. |
7013 | unauthorizedToken | OAuth unauthorized_token. |
7014 | expiredAccessToken | Access token expired. |
7015 | expiredRefreshToken | Refresh token expired. |
7016 | inactiveAccessToken | Access token inactive. |
7017 | accessDenied | Access denied. |
7018 | serverError | OAuth server_error. |
7019 | internalError | OAuth internal_error. |
7020 | invalidUserCredentials | Invalid user credentials. |
7021 | validateAccessTokenNullResult | iOS: token validation returned no result. On Android, 7021 is QUICK_LOGIN_ACCOUNT_BOUND (see the platform note above). |
7022 | refreshAccessTokenNullResult | Token refresh returned no result. |
7023 | getProfileNullResult | Profile fetch returned no result. |
7024 | authenticateNullResult | Authentication returned no result. |
7025 | quickLoginAccountBound | iOS only: the guest account is already bound to a VGA account. Android maps this case to 7021. |
7026 | quickLoginRequiredBinding | Binding is required: the user must bind their account (no skip option). |
7027 | quickLoginTurnOff | Quick login is disabled. The standard login options are shown instead. |
| 欄位 | 型別 | 說明 |
|---|---|---|
7000 | undefined | 未對應的 GGID/OAuth 錯誤(備用)。 |
7001 | cancelLogin | 玩家取消登入。 |
7005 | invalidRequest | OAuth invalid_request。 |
7006 | invalidClient | OAuth invalid_client。 |
7007 | invalidGrant | OAuth invalid_grant。 |
7008 | invalidScope | OAuth invalid_scope。 |
7009 | unsupportedResponseType | OAuth unsupported_response_type。 |
7010 | unsupportedGrantType | OAuth unsupported_grant_type。 |
7011 | unauthorizedClient | OAuth unauthorized_client。 |
7012 | unauthorizedCode | OAuth unauthorized_code。 |
7013 | unauthorizedToken | OAuth unauthorized_token。 |
7014 | expiredAccessToken | 存取權杖已過期。 |
7015 | expiredRefreshToken | 重新整理權杖已過期。 |
7016 | inactiveAccessToken | 存取權杖未啟用。 |
7017 | accessDenied | 存取遭拒。 |
7018 | serverError | OAuth server_error。 |
7019 | internalError | OAuth internal_error。 |
7020 | invalidUserCredentials | 使用者憑證無效。 |
7021 | validateAccessTokenNullResult | iOS: 權杖驗證未傳回任何結果。在 Android 上,7021 為 QUICK_LOGIN_ACCOUNT_BOUND(見上方平台說明)。 |
7022 | refreshAccessTokenNullResult | 權杖重新整理未傳回任何結果。 |
7023 | getProfileNullResult | 個人檔案取得未傳回任何結果。 |
7024 | authenticateNullResult | 身分驗證未傳回任何結果。 |
7025 | quickLoginAccountBound | 僅 iOS: 此訪客帳號已綁定到某個 VGA 帳號。Android 將此情形對應為 7021。 |
7026 | quickLoginRequiredBinding | 必須綁定: 使用者必須綁定其帳號(無略過選項)。 |
7027 | quickLoginTurnOff | 快速登入已停用。改為顯示標準登入選項。 |
| 字段 | 类型 | 描述 |
|---|---|---|
7000 | undefined | 未映射的 GGID / OAuth 错误(兜底)。 |
7001 | cancelLogin | 玩家取消了登录。 |
7005 | invalidRequest | OAuth invalid_request 错误。 |
7006 | invalidClient | OAuth invalid_client 错误。 |
7007 | invalidGrant | OAuth invalid_grant 错误。 |
7008 | invalidScope | OAuth invalid_scope 错误。 |
7009 | unsupportedResponseType | OAuth unsupported_response_type 错误。 |
7010 | unsupportedGrantType | OAuth unsupported_grant_type 错误。 |
7011 | unauthorizedClient | OAuth unauthorized_client 错误。 |
7012 | unauthorizedCode | OAuth unauthorized_code 错误。 |
7013 | unauthorizedToken | OAuth unauthorized_token 错误。 |
7014 | expiredAccessToken | 访问令牌已过期。 |
7015 | expiredRefreshToken | 刷新令牌已过期。 |
7016 | inactiveAccessToken | 访问令牌未激活。 |
7017 | accessDenied | 访问被拒绝。 |
7018 | serverError | OAuth server_error。 |
7019 | internalError | OAuth internal_error。 |
7020 | invalidUserCredentials | 用户凭据无效。 |
7021 | validateAccessTokenNullResult | iOS: 令牌验证未返回结果。在 Android 上,7021 为 QUICK_LOGIN_ACCOUNT_BOUND(见上方平台说明)。 |
7022 | refreshAccessTokenNullResult | 令牌刷新未返回结果。 |
7023 | getProfileNullResult | 资料获取未返回结果。 |
7024 | authenticateNullResult | 身份验证未返回结果。 |
7025 | quickLoginAccountBound | 仅 iOS: 该访客账号已绑定到某个 VGA 账号。Android 将此情形映射为 7021。 |
7026 | quickLoginRequiredBinding | 必须绑定: 用户必须绑定其账号(无跳过选项)。 |
7027 | quickLoginTurnOff | 快速登录已禁用。改为显示标准登录选项。 |
Auth: Passport legacy (8xxx)
Passport-legacy login errors. The SDK maps each Passport server return code to an 8xxx value (8000 = unknown fallback). error.code carries the 8xxx band while the original server code is in the message. Type = the source Passport server return code.
Passport legacy 登入錯誤。SDK 會將每個 Passport 伺服器回傳碼對應到一個 8xxx 值(8000=未知備用)。error.code 帶有 8xxx 分段,而原始伺服器碼則在訊息中。Type=來源 Passport 伺服器回傳碼。
Passport 旧版登录错误。SDK 将每个 Passport 服务器返回码映射为一个 8xxx 值(8000 = 未知兜底)。error.code 携带 8xxx 段,而原始服务器码在消息中。Type = 来源 Passport 服务器返回码。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
8000 | unknown | Unknown Passport-legacy login error (fallback). |
8001 | 1 | Success (server returned code 1). |
8002 | -500 | System error: inspect server logs. |
8003 | -404 | Invalid request (client called the wrong URL). |
8004 | -1 | Bad signature. |
8005 | -2 | Bad request parameters. |
8006 | -101 | Email is already registered. |
8007 | -102 | Email already in use (guest protection). |
8008 | -103 | Email does not exist (forgot / reset password). |
8009 | -104 | UserID is already protected. |
8010 | -105 | UserID not found (account disabled / deleted). |
8011 | -106 | Invalid login credentials. |
8012 | -107 | Invalid login credentials (profile mismatch / null). |
8013 | -108 | Invalid or expired session. |
8014 | -109 | Under the minimum age allowed to play. |
8015 | -110 | Account initialization failed. |
8016 | -111 | User is not in the early-access allow list. |
8017 | -112 | Account is locked. |
8018 | -113 | Account profile is incomplete. |
| 欄位 | 型別 | 說明 |
|---|---|---|
8000 | unknown | 未知的 Passport legacy 登入錯誤(備用)。 |
8001 | 1 | 成功(伺服器回傳碼 1)。 |
8002 | -500 | 系統錯誤: 請檢查伺服器記錄。 |
8003 | -404 | 無效的請求(用戶端呼叫了錯誤的 URL)。 |
8004 | -1 | 簽章錯誤。 |
8005 | -2 | 請求參數錯誤。 |
8006 | -101 | 電子郵件已註冊。 |
8007 | -102 | 電子郵件已被使用(訪客保護)。 |
8008 | -103 | 電子郵件不存在(忘記/重設密碼)。 |
8009 | -104 | UserID 已受保護。 |
8010 | -105 | 找不到 UserID(帳號已停用/已刪除)。 |
8011 | -106 | 登入憑證無效。 |
8012 | -107 | 登入憑證無效(個人檔案不符/為 null)。 |
8013 | -108 | 工作階段無效或已過期。 |
8014 | -109 | 未達允許遊玩的最低年齡。 |
8015 | -110 | 帳號初始化失敗。 |
8016 | -111 | 使用者不在搶先體驗的允許清單中。 |
8017 | -112 | 帳號已鎖定。 |
8018 | -113 | 帳號個人檔案不完整。 |
| 字段 | 类型 | 描述 |
|---|---|---|
8000 | unknown | 未知的 Passport 旧版登录错误(兜底)。 |
8001 | 1 | 成功(服务器返回码 1)。 |
8002 | -500 | 系统错误: 请检查服务器日志。 |
8003 | -404 | 请求无效(客户端调用了错误的 URL)。 |
8004 | -1 | 签名错误。 |
8005 | -2 | 请求参数错误。 |
8006 | -101 | 邮箱已被注册。 |
8007 | -102 | 邮箱已被使用(访客保护)。 |
8008 | -103 | 邮箱不存在(忘记 / 重置密码)。 |
8009 | -104 | UserID 已受保护。 |
8010 | -105 | 找不到 UserID(账号已禁用 / 删除)。 |
8011 | -106 | 登录凭据无效。 |
8012 | -107 | 登录凭据无效(资料不匹配 / 为空)。 |
8013 | -108 | 会话无效或已过期。 |
8014 | -109 | 未达到允许游玩的最低年龄。 |
8015 | -110 | 账号初始化失败。 |
8016 | -111 | 用户不在抢先体验白名单中。 |
8017 | -112 | 账号已被锁定。 |
8018 | -113 | 账号资料不完整。 |
Payment: billing server (6xxx)
Billing-server errors. The SDK maps each payment server return code to a 6xxx value (6000 = unknown fallback). Type = the source payment server code.
帳務伺服器錯誤。SDK 會將每個付款伺服器回傳碼對應到一個 6xxx 值(6000=未知備用)。Type=來源付款伺服器碼。
计费服务器错误。SDK 将每个支付服务器返回码映射为一个 6xxx 值(6000 = 未知兜底)。Type = 来源支付服务器码。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
6000 | unknown | Unknown billing-server error (fallback). |
6001 | 1 | Success (server returned code 1). |
6002 | -8 | System under maintenance (any payment-system error maps here). |
6003 | -70 | Payment error (uncategorized IAP pay failure). |
6004 | -71 | Invalid receipt (bad signature or mismatched package / product / order). |
6005 | -72 | Duplicate receipt (already verified successfully). |
6006 | -73 | Expired receipt (older than 72 hours). |
| 欄位 | 型別 | 說明 |
|---|---|---|
6000 | unknown | 未知的帳務伺服器錯誤(備用)。 |
6001 | 1 | 成功(伺服器回傳碼 1)。 |
6002 | -8 | 系統維護中(任何付款系統錯誤都對應到此)。 |
6003 | -70 | 付款錯誤(未分類的 IAP 付款失敗)。 |
6004 | -71 | 收據無效(簽章錯誤或 package/product/order 不符)。 |
6005 | -72 | 重複的收據(已成功驗證過)。 |
6006 | -73 | 收據已過期(超過 72 小時)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
6000 | unknown | 未知的计费服务器错误(兜底)。 |
6001 | 1 | 成功(服务器返回码 1)。 |
6002 | -8 | 系统维护中(任何支付系统错误都映射到此)。 |
6003 | -70 | 支付错误(未分类的 IAP 支付失败)。 |
6004 | -71 | 收据无效(签名错误或 package / product / order 不匹配)。 |
6005 | -72 | 收据重复(已成功验证过)。 |
6006 | -73 | 收据已过期(超过 72 小时)。 |
Payment: store / verification (9xxx)
Store, receipt, and verification errors raised during the purchase flow (9xxx client-side band). iOS and Android differ: both are merged here, so the same code number can carry a different meaning on each platform. Type shows the source symbol(s) (iOS / Android).
在購買流程期間引發的商店、收據與驗證錯誤(9xxx 用戶端分段)。iOS 與 Android 有所不同: 此處合併列出,同一組代碼在不同平台上可能代表不同含義。Type 欄顯示來源符號(iOS/Android)。
在购买流程中引发的商店、收据与验证错误(9xxx 客户端段)。iOS 与 Android 有所不同: 此处合并列出,同一组代码在不同平台上可能代表不同含义。Type 列显示来源符号(iOS / Android)。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
9006 | paymentInfoInvalid / ITEM_NOT_FOUND_CHECK_ITEM | iOS: the purchase info is invalid. Android: product not found on the pre-purchase inventory check. |
9007 | paymentProductNotFound / ITEM_NOT_FOUND_PURCHASE_ITEM | Product id not found. |
9008 | paymentVerificationInProgress / ITEM_IS_VERIFYING | A verification is already in progress. |
9009 | paymentCanceled / PAYMENT_CANCEL | Player canceled the purchase. |
9010 | NOT_SIGN_IN_GOOGLE_PLAY | Android: the player is not signed in to Google Play. |
9011 | NOT_REGISTER_ITEM | Android: the item / reward package is not registered. |
9012 | HAS_SUBSCRIPTION | Android: the player already owns an active subscription for this item. |
9013 | PRODUCT_IS_PENDING | Android: the purchase is pending (not yet completed). |
9014 | PURCHASE_FAILED_WITH_BILLING_ERROR | Android: purchase failed due to a Google Play billing error. |
9015 | PURCHASE_FAILED_NOT_CONTAIN_PURCHASE_LIST | Android: purchase failed. The returned purchase list did not contain the item. |
9016 | paymentRetrieveAppleReceiptFailed | iOS: could not read the App Store receipt. |
9017 | paymentOrderDataInvalid | iOS: the order data is invalid. |
9049 | paymentPending | iOS: the purchase is pending approval (deferred / Ask-to-Buy). |
| 欄位 | 型別 | 說明 |
|---|---|---|
9006 | paymentInfoInvalid / ITEM_NOT_FOUND_CHECK_ITEM | iOS: 購買資訊無效。Android: 購買前查詢庫存時找不到該商品。 |
9007 | paymentProductNotFound / ITEM_NOT_FOUND_PURCHASE_ITEM | 找不到商品 ID。 |
9008 | paymentVerificationInProgress / ITEM_IS_VERIFYING | 已有一項驗證正在進行中。 |
9009 | paymentCanceled / PAYMENT_CANCEL | 玩家取消了購買。 |
9010 | NOT_SIGN_IN_GOOGLE_PLAY | Android: 尚未登入 Google Play。 |
9011 | NOT_REGISTER_ITEM | Android: 道具/獎勵包未註冊。 |
9012 | HAS_SUBSCRIPTION | Android: 已擁有此項目的有效訂閱。 |
9013 | PRODUCT_IS_PENDING | Android: 購買處於待處理狀態(尚未完成)。 |
9014 | PURCHASE_FAILED_WITH_BILLING_ERROR | Android: 因 Google Play 帳務錯誤導致購買失敗。 |
9015 | PURCHASE_FAILED_NOT_CONTAIN_PURCHASE_LIST | Android: 購買失敗。回傳的購買清單未包含該項目。 |
9016 | paymentRetrieveAppleReceiptFailed | iOS: 無法讀取 App Store 收據。 |
9017 | paymentOrderDataInvalid | iOS: 訂單資料無效。 |
9049 | paymentPending | iOS: 購買正等待核准(延遲/需家長同意)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
9006 | paymentInfoInvalid / ITEM_NOT_FOUND_CHECK_ITEM | iOS: 购买信息无效。Android: 购买前查询库存时找不到该商品。 |
9007 | paymentProductNotFound / ITEM_NOT_FOUND_PURCHASE_ITEM | 找不到商品 id。 |
9008 | paymentVerificationInProgress / ITEM_IS_VERIFYING | 已有一个验证正在进行中。 |
9009 | paymentCanceled / PAYMENT_CANCEL | 玩家取消了购买。 |
9010 | NOT_SIGN_IN_GOOGLE_PLAY | Android: 尚未登录 Google Play。 |
9011 | NOT_REGISTER_ITEM | Android: 道具 / 奖励包未注册。 |
9012 | HAS_SUBSCRIPTION | Android: 已拥有此项目的有效订阅。 |
9013 | PRODUCT_IS_PENDING | Android: 购买处于待处理状态(尚未完成)。 |
9014 | PURCHASE_FAILED_WITH_BILLING_ERROR | Android: 因 Google Play 结算错误导致购买失败。 |
9015 | PURCHASE_FAILED_NOT_CONTAIN_PURCHASE_LIST | Android: 购买失败。返回的购买列表未包含该商品。 |
9016 | paymentRetrieveAppleReceiptFailed | iOS: 无法读取 App Store 收据。 |
9017 | paymentOrderDataInvalid | iOS: 订单数据无效。 |
9049 | paymentPending | iOS: 购买正在等待批准(延迟 / 需家长同意)。 |
General & availability (9xxx)
Cross-cutting client errors any flow can surface, plus feature-availability sentinels. Customer support surfaces an error with the string code invalid_payload. (Reserved/unused: 9004, and 9010 to 9015.)
任何流程都可能出現的橫切用戶端錯誤,以及功能可用性的哨符值。客戶支援會以字串碼 invalid_payload 呈現一個錯誤。(保留/未使用:9004、9010 至 9015)
任何流程都可能暴露的横切客户端错误,以及功能可用性哨兵值。客户支持会以字符串码 invalid_payload 暴露一个错误。(保留 / 未使用:9004、9010 至 9015)
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
9000 | undefined | Undefined / unknown error. |
9001 | networkFailed | Network request failed (retryable). |
9002 | wrongDataFormat | Malformed response data. |
9003 | cancelLogin | Login canceled (SDK band). |
9005 | googleRefreshTokenFailed | Google token refresh failed. |
9018 | appleCredentialNotFoundInAuthorizationResult | Apple authorization returned no credential. |
9019 | googleConfigNotFound | Google config missing. |
9020 | facebookConfigNotFound | Facebook config missing. |
9021 | appleTwoAuthenticationError | Sign in with Apple 2FA error. |
9022 | appleCancelError | Player canceled Sign in with Apple. |
9023 | appleOtherError | Other Sign in with Apple error. |
9025 | appleCachedCredentialNotFound | No cached Apple credential. |
9036 | googleUnsupported | Google login not enabled in this build. |
9037 | vgaUnsupported | VGA login not enabled in this build. |
9047 | firebaseUnsupported | Firebase not enabled in this build. |
| 欄位 | 型別 | 說明 |
|---|---|---|
9000 | undefined | 未定義/未知的錯誤。 |
9001 | networkFailed | 網路請求失敗(可重試)。 |
9002 | wrongDataFormat | 回應資料格式錯誤。 |
9003 | cancelLogin | 登入已取消(SDK 分段)。 |
9005 | googleRefreshTokenFailed | Google 權杖重新整理失敗。 |
9018 | appleCredentialNotFoundInAuthorizationResult | Apple 授權未傳回任何憑證。 |
9019 | googleConfigNotFound | 缺少 Google 設定。 |
9020 | facebookConfigNotFound | 缺少 Facebook 設定。 |
9021 | appleTwoAuthenticationError | 使用 Apple 登入的兩階段驗證錯誤。 |
9022 | appleCancelError | 玩家取消了使用 Apple 登入。 |
9023 | appleOtherError | 其他使用 Apple 登入的錯誤。 |
9025 | appleCachedCredentialNotFound | 沒有快取的 Apple 憑證。 |
9036 | googleUnsupported | 此版本未啟用 Google 登入。 |
9037 | vgaUnsupported | 此版本未啟用 VGA 登入。 |
9047 | firebaseUnsupported | 此版本未啟用 Firebase。 |
| 字段 | 类型 | 描述 |
|---|---|---|
9000 | undefined | 未定义 / 未知错误。 |
9001 | networkFailed | 网络请求失败(可重试)。 |
9002 | wrongDataFormat | 响应数据格式错误。 |
9003 | cancelLogin | 登录已取消(SDK 段)。 |
9005 | googleRefreshTokenFailed | Google 令牌刷新失败。 |
9018 | appleCredentialNotFoundInAuthorizationResult | Apple 授权未返回凭据。 |
9019 | googleConfigNotFound | 缺少 Google 配置。 |
9020 | facebookConfigNotFound | 缺少 Facebook 配置。 |
9021 | appleTwoAuthenticationError | Sign in with Apple 双重验证(2FA)错误。 |
9022 | appleCancelError | 玩家取消了 Sign in with Apple。 |
9023 | appleOtherError | 其他 Sign in with Apple 错误。 |
9025 | appleCachedCredentialNotFound | 没有缓存的 Apple 凭据。 |
9036 | googleUnsupported | 此构建版本未启用 Google 登录。 |
9037 | vgaUnsupported | 此构建版本未启用 VGA 登录。 |
9047 | firebaseUnsupported | 此构建版本未启用 Firebase。 |
Unreal: plugin codes
On Unreal a failure arrives as an FVGSDKError whose Code is a STRING, not a number. Two kinds reach your game. The plugin’s own codes below are raised by the UE layer before or around the native call. Anything else is the underlying native SDK’s code forwarded verbatim, so on Android and iOS you will also see the numeric mobile bands documented above, and on Windows the numeric PC bands.
在 Unreal 上,失敗會以 FVGSDKError 回傳,其 Code 是字串而非數字。你的遊戲會收到兩種來源。下方是外掛本身的代碼,由 UE 層在原生呼叫之前或周圍產生。其餘則是原封不動轉傳的原生 SDK 代碼,因此在 Android 與 iOS 上你也會看到上方記載的行動平台數字區段,在 Windows 上則是 PC 的數字區段。
在 Unreal 上,失败会以 FVGSDKError 返回,其 Code 是字符串而非数字。你的游戏会收到两种来源。下方是插件本身的代码,由 UE 层在原生调用之前或周围产生。其余则是原封不动转发的原生 SDK 代码,因此在 Android 与 iOS 上你也会看到上方记载的移动平台数字区段,在 Windows 上则是 PC 的数字区段。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
NOT_SUPPORTED | all targets | The call is not implemented on this build target. Message: This feature is not supported!. See each method’s build-target note for which targets run it. |
DLL_LOAD_ERROR | Windows | VNGGamesSDK.dll was not loaded. Message: VNGGamesSDK.dll not loaded. Confirm the DLL is staged next to the game executable. |
PARSE_ERROR | Windows | The native login result could not be parsed. The message quotes the unparseable payload. |
JNI_INIT_ERROR | Android | The plugin could not initialize JNI for the call. |
CLASS_NOT_FOUND | Android | A required Java class was not found. Check that the VGSDK Gradle plugin and its dependencies resolved. |
CONSTRUCTOR_NOT_FOUND | Android | A required Java constructor was not found, which usually means a native SDK version mismatch. |
INSTANCE_CREATION_FAILED | Android | A required Java object could not be constructed. |
SETTER_NOT_FOUND | Android | A required Java setter was not found, which usually means a native SDK version mismatch. |
METHOD_NOT_FOUND | Android | The target Java method was not found, which usually means a native SDK version mismatch. |
REGISTER_NATIVE_FAILED | Android | The plugin could not register its JNI callbacks for the call. |
JNI_EXCEPTION | Android | The underlying Java call threw. Check logcat for the Java stack trace. |
FETCH_CONFIG_FAIL | Android and iOS | Firebase Remote Config could not be fetched. |
| 欄位 | 型別 | 說明 |
|---|---|---|
NOT_SUPPORTED | all targets | 此建置目標未實作該呼叫。訊息為 This feature is not supported!。哪些目標會實際執行,請參閱各方法的建置目標說明。 |
DLL_LOAD_ERROR | Windows | 未載入 VNGGamesSDK.dll。訊息為 VNGGamesSDK.dll not loaded。請確認該 DLL 已部署在遊戲執行檔旁邊。 |
PARSE_ERROR | Windows | 無法解析原生登入結果。訊息中會引用無法解析的內容。 |
JNI_INIT_ERROR | Android | 外掛無法為此呼叫初始化 JNI。 |
CLASS_NOT_FOUND | Android | 找不到必要的 Java 類別。請確認 VGSDK Gradle 外掛及其相依套件已正確解析。 |
CONSTRUCTOR_NOT_FOUND | Android | 找不到必要的 Java 建構式,通常表示原生 SDK 版本不符。 |
INSTANCE_CREATION_FAILED | Android | 無法建立必要的 Java 物件。 |
SETTER_NOT_FOUND | Android | 找不到必要的 Java setter,通常表示原生 SDK 版本不符。 |
METHOD_NOT_FOUND | Android | 找不到目標 Java 方法,通常表示原生 SDK 版本不符。 |
REGISTER_NATIVE_FAILED | Android | 外掛無法為此呼叫註冊其 JNI 回呼。 |
JNI_EXCEPTION | Android | 底層 Java 呼叫拋出例外。請查看 logcat 取得 Java 堆疊追蹤。 |
FETCH_CONFIG_FAIL | Android and iOS | 無法取得 Firebase Remote Config。 |
| 字段 | 类型 | 描述 |
|---|---|---|
NOT_SUPPORTED | all targets | 此构建目标未实现该调用。消息为 This feature is not supported!。哪些目标会实际执行,请参阅各方法的构建目标说明。 |
DLL_LOAD_ERROR | Windows | 未加载 VNGGamesSDK.dll。消息为 VNGGamesSDK.dll not loaded。请确认该 DLL 已部署在游戏可执行文件旁边。 |
PARSE_ERROR | Windows | 无法解析原生登录结果。消息中会引用无法解析的内容。 |
JNI_INIT_ERROR | Android | 插件无法为此调用初始化 JNI。 |
CLASS_NOT_FOUND | Android | 找不到必要的 Java 类。请确认 VGSDK Gradle 插件及其依赖包已正确解析。 |
CONSTRUCTOR_NOT_FOUND | Android | 找不到必要的 Java 构造函数,通常表示原生 SDK 版本不匹配。 |
INSTANCE_CREATION_FAILED | Android | 无法创建必要的 Java 对象。 |
SETTER_NOT_FOUND | Android | 找不到必要的 Java setter,通常表示原生 SDK 版本不匹配。 |
METHOD_NOT_FOUND | Android | 找不到目标 Java 方法,通常表示原生 SDK 版本不匹配。 |
REGISTER_NATIVE_FAILED | Android | 插件无法为此调用注册其 JNI 回调。 |
JNI_EXCEPTION | Android | 底层 Java 调用抛出异常。请查看 logcat 获取 Java 堆栈跟踪。 |
FETCH_CONFIG_FAIL | Android and iOS | 无法获取 Firebase Remote Config。 |