1. Product Overview
GOT Online is a cloud-based performance analysis and continuous optimization platform designed specifically for game developers. It fully supports Android, iOS, Windows, and HarmonyOS NEXT.
By integrating the GameOptim SDK, developers can collect real-time runtime data including:
- CPU
- GPU
- Memory
- Resources
- Lua scripts
- Rendering metrics
After uploading the data to the GameOptim platform, developers can efficiently perform:
- Performance trend tracking
- Cross-version comparison
- Team-based collaborative analysis
- Historical issue tracing
Unlike traditional one-time performance testing tools, GOT Online provides a continuous performance governance solution across the entire game lifecycle.
2. Quick Start (10 Minutes)
Requirements
- Unity Editor
- Test Device
- GameOptim Account
Step 1: Import the SDK
Import the SDK by dragging:
GameOptim_SDKvX.X.X.unitypackage
into the Unity Editor.
Step 2: Enable the SDK
Navigate to:
Tools → GameOptim SDK → Setup
Then press Play in the Editor.
If the GameOptim floating UI appears in the top-right corner of the Game view without errors, the SDK integration is successful.
Step 3: Build a Test Package
Open Build Settings and enable:
Development Build
Build and install the application on the test device.
Once the app launches, the GameOptim SDK control panel will appear at the top of the screen.
Step 4: Run a Test and Upload Data
Select Overview (Overall Performance Analysis) in the GameOptim panel.
Click Start and play the game normally or reproduce the performance issue.
Click Stop to finish data collection.The data will be saved locally on the device.
Then Login → Select Project → Submit → View report on the website
3. Unity Integration & Build Guide
3.1 SDK Package Selection
GameOptim provides two Unity packages.
| SDK Package | Use Case |
|---|---|
| GameOptim_SDKvX.X.X.unitypackage | Recommended for most projects |
| GameOptim_SDKvX.X.X(Vulkan).unitypackage | For Android projects using Vulkan rendering, Unity ≥ 2019.4, Minimum API Level ≥ 24 |
The Vulkan version is compatible with most OpenGL scenarios.
If your project frequently switches between Vulkan and OpenGL, or does not need to support Android 7 and below, the Vulkan package is recommended.
3.2 Build Settings
3.2.1 Setup Function
Execute the following in the Unity menu:
Tools → GameOptim SDK → Setup
This operation will:
- Enable or disable SDK .dll /.so /.a files based on the current platform
- Prevent compilation conflicts between different platforms
During normal builds, this step runs automatically in:
OnPreprocessBuild
If SDK-related compilation errors occur (especially when building AssetBundles or CI pipelines), it is recommended to run Setup manually once.
3.2.2 Development Build
| Mode | Description |
|---|---|
| Development | Supports full analysis. Resource / Mono / Lua / GPU modes require Development builds |
| Release | Overview-only, non-intrusive data collection. Captures only high-level metrics similar to real player devices |
3.2.3 Auto Launch Setting
In the Settings panel you can configure Auto Launch.
If enabled (default):
The GameOptim SDK UI loads automatically when the project runs.
If disabled:
The SDK must be initialized manually using the API:
UWAEngine.StaticInit
See Section 7.1.2 Initialization for details.
3.2.4 Production Build
Follow the standard release process.
To support Real Device Testing Service, the build must be Development.
If building through the BuildPlayer interface, ensure the following option is included:
BuildOptions.DevelopmentIf testing Mono mode under IL2CPP, enable:
Script Debugging
and include:
BuildOptions.AllowDebuggingWhen building a final Release version, you can remove the SDK by:
Deleting the UWA_SDK folder, or
Adding the following define in Player Settings:
DISABLE_UWA_SDK
For automated build pipelines, SDK inclusion can be controlled via:
PlayerSettings.SetScriptingDefineSymbolsForGroup
3.3 HarmonyOS NEXT
Add the GameOptim annotation code to
TuanjiePlayerAbility.ts
3.4 Remove SDK
Recommended: Copy the code block to Define Symbols
DISABLE_UWA_SDK
or delete
Assets/UWA/UWA_SDK
4. Running a Performance Test
4.1 Standard Workflow
Select Mode → Start → Run test scenario → Stop → Upload
4.2 Mode Selection
| Target Issue | Mode | Description | Analysis Path |
|---|---|---|---|
| Stuttering | Overview | FPS drop, memory spikes, power consumption | FPS / CPU / GPU / Memory / Timeline |
| Memory | Mono | Memory growth without release | C# memory leak analysis |
| Lua | Lua | Slow Lua logic | Lua CPU & memory analysis |
| Rendering | GPU | DrawCall / Overdraw | Rendering pipeline analysis |
If unsure, start with Overview mode.
4.3 Data Coverage Across Platforms
The GameOptim SDK supports both Development Build and Release Build packaging modes.
Development Build
The Development Build mode supports five testing modes, including:
| Mode | Android | iOS | Windows | HarmonyOS NEXT |
|---|---|---|---|---|
| Overview – Overall Performance Analysis | ✅ | ✅ | ✅ | ✅ |
| Mono – Mono Heap Memory Analysis | ✅ | ✅ | ✅ | |
| Lua – Lua Performance Analysis | ✅ | ✅ | ||
| GPU – GPU Performance Analysis | ✅ | ✅ |
Note:The Lua module is only applicable to projects that use Lua scripting.
Release Build
The Release Build mode only supports the Minimal version of Overview Mode.
For details, please refer to the official Demo page on the website.
Important Notes
Data availability may depend on:
- Unity version
- Rendering API
- Device model
Please refer to the following data support specifications.
4.4 Configuration Requirements for Certain Features
Some metrics are affected by Unity version and build configuration.
Android Platform
| Feature | Supported | Version & Configuration Requirements |
|---|---|---|
| Mono – Heap Memory Cumulative Allocation | ✅ | Mono build: No restriction IL2CPP: Unity ≥ 2019.4 and Script Debugging enabled |
| Mono – Heap Memory Leak Analysis | ✅ | Same as above |
| Mono – Object Snapshot (Dump) | ❌ (Mono) / ✅ (IL2CPP) | IL2CPP + Unity ≥ 2019.4 + Script Debugging |
| Overview – Vulkan DrawCall / Triangle | ✅ | Unity ≥ 2019.4 and Vulkan version of GameOptim SDK |
| Overview – Timeline Custom Function Parameters | ✅ | Unity ≥ 2021 |
| GPU Mode – Rendering Resource Analysis | ✅ | Unity ≥ 2018.2 |
Windows Platform
| Feature | Supported | Version & Configuration Requirements |
|---|---|---|
| Mono – Heap Memory Cumulative Allocation | ✅ | Mono build: Unity 2018–2020 only IL2CPP: Unity ≥ 2019.4 + Script Debugging |
| Mono – Heap Memory Leak Analysis | ❌ | Not supported |
| Mono – Object Snapshot (Dump) | ❌ (Mono) / ✅ (IL2CPP) | IL2CPP + Unity ≥ 2019.4 + Script Debugging |
| Overview – Timeline Custom Function Parameters | ✅ | Unity ≥ 2021 |
iOS Platform
| Feature | Supported | Version & Configuration Requirements |
|---|---|---|
| Overview – Timeline Custom Function Parameters | ✅ | Unity ≥ 2021 |
HarmonyOS NEXT Platform
| Feature | Supported | Version & Configuration Requirements |
|---|---|---|
| Mono – Heap Memory Cumulative Allocation | ✅ | Mono build: No restriction IL2CPP: Script Debugging enabled |
| Mono – Heap Memory Leak Analysis | ✅ | Same as above |
| Mono – Object Snapshot (Dump) | ❌ (Mono) / ✅ (IL2CPP) | IL2CPP + Script Debugging |
5. Data Upload
5.1 Direct Upload
After clicking Stop:
Login → Submit → View report
6. FAQ
6.1 Windows Screenshot Issue
If screenshots appear black, temporarily switch Color Space to Gamma and run the test again.
6.2 Android / HarmonyOS NEXT GPU Data Collection
(1) GPU Counter Not Available
If GPU counter data is unavailable, try the following:
Adreno GPU (Android 12 and above)
You can manually enable GPU counters via the following ADB command:
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/perfcounter"Note:Some manufacturers (e.g., Xiaomi) may restrict this feature at the system level.
Mali GPU
If GPU Counter data cannot be collected:
Try rebooting the device (multiple attempts may be required).
(2) SOC Data Collection Issues
SOC data includes:
- GPU Frequency
- GPU Utilization
Current support:
- MTK (MediaTek)
- HISI (Huawei HiSilicon)
Supported device models can be found here:
HISI Chip Requirements
Minimum Android version: Android 10
Some devices may require higher system versions for proper data collection.
6.3 Android Platform – Screenshot Limitations
Due to Android permission restrictions, the screenshot feature is only supported on Android 5.0 and above.
To support different Android versions, the SDK provides three AAR libraries.
| AAR File | Screenshot Method |
|---|---|
| uwa_pc.aar | PixelCopy |
| uwa_mp.aar | MediaProjection |
| uwa_mp28.aar | MediaProjection |
Automatic Selection in Unity
When building from the Unity Editor, the SDK automatically selects the appropriate AAR file.
Manual Configuration (Non-Unity Build Systems)
If using other build pipelines, configure the AAR files manually according to the following rules.
Target API ≥ 29 (Android 10+)
Enable:
- uwa_pc.aar
- uwa_mp.aar
Disable:
- uwa_mp28.aar
- Target API < 29
Enable:
- uwa_pc.aar
- uwa_mp28.aar
Disable:
uwa_mp.aar
6.4 Removing the SDK from the Release Build
There are two methods to remove the SDK in production builds.
Method 1 (Recommended)
Add the following Scripting Define Symbol:
Scripting Define Symbols += DISABLE_UWA_SDK
Method 2
Manually delete the SDK directory:
Assets/UWA/UWA_SDK
7. GameOptim API Reference
The GameOptim API provides performance monitoring and data collection interfaces for game developers.
It supports deep integration with the GameOptim ecosystem.
The API enables:
- Custom performance metrics
- Automated testing
- CI integration
- Precise performance analysis
If UI-based testing is sufficient, the API is not required.
Typical API usage scenarios:
| Scenario | API |
|---|---|
| Start test at specific level | Start / Stop |
| Measure logic execution time | PushSample / PopSample |
| Mark gameplay phases | Tag / Note |
| Add build metadata | SetBundleVersion / AddMeta |
| Automated CI testing | Upload |
7.1 SDK Lifecycle Control
7.1.1 Initialization
If Auto Launch is disabled, initialize the SDK manually:
UWAEngine.StaticInitpublic static void StaticInit();If Direct Mode is used, data collection will only begin after StaticInit following a game restart.
7.1.2 Start / Stop Test
UWAEngine.Startpublic static void Start(Mode mode)UWAEngine.Stoppublic static void Stop()This API allows you to dynamically start and stop the current test via script, without manually clicking the stop button.
This is the core API for automated testing and CI performance recovery.
7.1.3 Show / Hide GUI
UWAEngine.SetUIActivepublic static void SetUIActive(bool active);Note: This effect can also be achieved manually. On mobile devices, you can use four fingers to touch the screen simultaneously; on PCs, you can use the ``` key to hide/show the SDK's GUI interface during testing.
7.1.4 Enable / Disable Log Tracking
Before starting the test, enable or disable the SDK's log statistics function during the test.
UWAEngine.SetLogTrackpublic static void SetLogTrack(bool active);7.1.5 Customizing Test Configurations for All Modes
UWAEngine.SetConfigpublic static void SetConfig(string config);This function can be used to customize the test configurations for all modes via scripts, eliminating the need for manual settings.
For detailed configuration content and usage instructions, please refer to the function comments and descriptions.
7.2 Marking Key Events in Reports
7.2.1 Tag
UWAEngine.Tagpublic static void Tag(string tag);This function can be used to mark test intervals, which will overwrite the Unity scene name and become the interval statistics dimension in GOT Online, used to separate the performance of "loading / combat / UI / settlement".
7.2.2 Note
UWAEngine.Notepublic static void Note(string note);Adds notes to test reports.
7.2.3 Add Metadata
UWAEngine.AddMetapublic static void AddMeta(string key, string value);This function can be used to: tag multiple sets of key-value pairs, supports multiple calls, but the key cannot be repeated (only the parameters from the first call are retained for calls with the same key). The tagged content can be viewed in the following location in the report.
7.3 Script Performance Profiling
7.3.1 Custom CPU Sample
This function can be used to: measure the CPU time spent on custom code segments, thereby quickly identifying script performance bottlenecks. The parameter sampleName represents the custom function label. GameOptim SDK will measure the CPU overhead of the code segment between PushSample and `PopSample` and display it in the statistics panel of GOT. This API supports nested calls and can also be used in child threads.
UWAEngine.PushSample/PopSample
public static void PushSample(string sampleName);public static void PopSample();UWAEngine.PushSample("MyCode");// some code...UWAEngine.PopSample();Finally, in the Overview interface, you can see the custom function labels and their specific execution time (A to E in the image below are all custom function labels).
- Ensure that PushSample and PopSample are used in pairs.
- Development environment only.
- If a return statement is used to prematurely exit the code segment between them (or if yield return is used in a coroutine to prematurely exit the code segment), it will cause inaccurate pairing of PushSample and PopSample, resulting in data errors.
- Please note that the number of times PushSample and PopSample are called in the same frame should not be too many. Statistically, on low- to mid-range devices, 10,000 calls can result in an additional overhead of nearly 50ms.
7.3.2 Log Variable Values
By statistically analyzing the changes in the values of custom labels in each frame, the trend of key variables can be visualized.
UWAEngine.LogValuepublic static void LogValue(string valueName, float value);public static void LogValue(string valueName, int value);public static void LogValue(string valueName, bool value);public static void LogValue(string valueName, Vector3 value);- The parameter valueName represents a custom variable label, and value represents the current value of the corresponding variable.
- Only supported in the Development environment.
7.3.3 Count Call Frequency
This function can be used to count the number of times a custom tag is marked in each frame, thus allowing the interface to be used to count the number of times a Lua calls a C# interface.
UWAEngine.AddMarkerpublic static void AddMarker (string valueName);- Only supports the Development environment.
7.4 Memory & Rendering Dump
UWAEngine.Dumppublic static void Dump(eDumpType type);Supports only the Development environment; this function can be used to trigger dump operations in various test modes.
| Mode | Dump Type |
|---|---|
| Overview | Lua |
| Mono | ManagedHeap |
| Lua | Lua |
| GPU | Overdraw |
7.5 Custom Lua Library
UWAEngine.SetOverrideLuaLibpublic static void SetOverrideLuaLib(string luaLib)In Lua mode, this function can be used to specify the name of a custom Lua library via a script, such as libgamex.so.
If using the default Lua library (ulua/tolua/slua/xlua), this interface is not required to specify it.
7.6 Automatic Report Upload
During game runtime, test data is uploaded by passing in account information, project ID, and project name.
UWAEngine.Uploadpublic static void Upload(Action<bool, string> callback, string user, string pwd, int projectId, int timeLimitSec)public static void Upload(Action<bool, string> callback, string user, string pwd, string projectName, int timeLimitSec)- Development environment only.
- callback is the callback function that appears after the upload is complete. The bool parameter represents the upload result, and the string parameter is the recordId of the report, which can be used to query data via OpenAPI.
- user/pwd are the username and password for logging into the GameOptim website.
- projectId/projectName are the ID or name of the uploaded project.
- timeLimitSec is the maximum time limit for uploaded data (to prevent automatically uploading excessively long data due to logical errors).
- ProjectID is the ID field in the project card after opening the project.
7.7 Version Management
UWAEngine.SetBundleVersionPublic static void SetBundleVersion(string version)This function can be used to set the current version number via a script, which will be displayed in the GOT Online report information.
7.8 Disable SDK in Release Builds
DISABLE_UWA_SDK
When DISABLE_UWA_SDK is defined in the editor settings, all GameOptim SDK-related code will be disabled during the APK packaging and compilation process, resulting in the absence of GameOptim-related DLLs or SO files in the final APK. This can be used when releasing the official package.
7.9 Start / Stop Callback Support
UWAEngine.OnStart
Allows callbacks when tests start or stop.
7.10 Disable Log Recording
UWAEngine.SetLogTrack(bool active)If disabled, log files will not be generated.
7.11 Custom Memory Reporting
Add a new API to support reporting Lua or Wwise memory usage.
public static void SetMemoryKB (SdkMemType type, int memory)It supports all platforms and can use the reported values as memory values in Lua and wwise.
