SDK Name: SolarEngine Unity SDK v1.3.8
Developer: Huiliang Cloud (Beijing) Technology Co., Ltd.
SDK Version: 1.3.8
Features: SolarEngine (SE) is an all-in-one mobile app growth analytics and publishing intelligence platform. It supports data management across global channels, assisting developers to monitor every stage of business development. With our attribution and user-level ROI analysis, you'll be able to measure the true value every channel creates and optimize future growth strategies. SE also offers various analysis models and A/B testing feature to help fully visualize the user journey, identify potential pain points, implement targeted product enhancements and ultimately drive large-scale app growth.
Privacy Policy: https://www.solar-engine.com/privacyPolicyEN.html
Note:
The SolarEngine SDK supports Android 5.0 (API Level 21) and above.
Access Path: Asset Management - App Management - AppKey
Please login to the live version and get appkey for your own product.

Download via solarengine-unity-sdk-1.3.8zip
Version 1.3.8+. Corresponding iOS ≥ 1.3.3, Android ≥ 1.3.3.When using Unity 6, after building the project into an APK and installing it on an Android device, if you find the app icon fails to display on the home screen, or the app cannot be launched from the home screen, please refer to the link for resolution.
1) Download the latest SDK zip package, and extract it to a local directory.
2) Import solarengine-unity-sdk.unitypackage into Unity.
Note: When you upgrade SDK version to 1.3.0.0 and above, you might encounter some issues. We have listed a few in Common Questions for your reference.
Starting from v1.3.2, automatic SDK integration via Package Manager is supported.
https://github.com/solarengine-sdk/unity-sdk.git, then click "Add" and wait for the loading to complete.If the folder does not appear:

5. Import the External Dependency Manager plugin:
Window > Package Manager > My Registries, locate External Dependency Manager for Unity, and click "Install".
If the plugin is not found in My Registries:

Name: package.openupm.com
URL: https://package.openupm.com
Scope(s): com.google.external-dependency-manager
6. The SDK shall work normally once imported.
Please refer to the GitHub open-source project for demo, in which you can find examples of how each method is called in the SolarEngineDemo.cs script.
Clicking on "SolarEngineSDK-->SDK Edit Settings" will open the SolarEngineSettings panel.

SDK Edit Settings Introduction
Example

Click "Apply" and you'll receive a "success" notifcation as below. It means SDK settings are finished.

1. For Xcode versions, 14.0 and above are supported.
2. Accessible for iOS 11.0 and later.
3. CocoaPods is required for the plugin. Please install following the guide here.
(CocoaPods integration requires opening a file with the .xcworkspace extension.)
4. If you want to integrate manually, please refer to the guide here.
1. Please make sure you can see this page after SDK version is upgraded.
(First make sure the current Unity is on Android platform.)

If successfully pulled, the SDK version under Plugins-->Android directory will be same as that you input into the panel before.
If failed, please refer to the solution in Common Questions.
2. Add the following permission into the AndroidManifest.xml file in your project.
Access Path: Assets/Plugins/Android/AndroidManifest.xml
<uses-permission android:name="android.permission.READ_PHONE_STATE" />Note: The android.permission.READ_PHONE_STATE is a non-essential permission. If you are using the China Mainland version SDK, the SolarEngine SDK does not force developers to obtain this permission. If you have obtained this permission and the Android system is version 6.0 or higher, you will need to dynamically request this permission.

Add Global Macro Parameter
Wechat Mini Game:Requires integrating the open-source Unity to WeChat Mini Game plugin provided by the WeChat team
Douyin Mini Game: Requires integrating the StarkSDK plugin provided by Toutiao
Douyin Cloud Game: Requires integrating the Cloud Acceleration SDK provided by Toutiao
Kuaishou Mini Game: Requires integrating the Unity WebGL SDK provided by Kuaishou
Before formal integration, you need to add different global macro parameters for different platforms.
Wechat Mini Game: SOLARENGINE_WECHAT
Douyin Mini Game: SOLARENGINE_BYTEDANCE
Douyin Cloud Game: SOLARENGINE_BYTEDANCE_CLOUD
Kuaishou Mini Game: SOLARENGINE_KUAISHOU
The steps are as follows:
• Open the Project Settings window;
• Find Scripting Define Symbols, add a new line and enter the global macro parameter for the corresponding platform, then click the Apply button to complete the setup.
Douyin Mini Game
(Tuanjie Engine only) Before publishing to WebGL, please click SolarEngineSDK --> MiniGame --> Tuanjie --> BeforeBuildForTT.

Douyin Cloud Game
Follow:Douyin Mini Game Support Douyin Cloud
Follow:WeChat Mini Game Supports Tencent Event Callback
Integrating Mini Games via UPM in Tuanjie Engine
Due to incomplete support for LifeCycleBase (lifecycle hooks) in UPM integration mode within the Tuanjie Engine, automatically triggered lifecycle functions (such as beforeCopyDefault, afterBuildTemplate, etc.) may fail to execute properly for WeChat and Kuaishou Mini Games.
Therefore, if you choose to integrate the SolarEngineSDK Mini Game module via UPM, you must manually perform the build steps before and after building WeChat or Kuaishou Mini Games.
Before Build
SolarEngineSDK → MiniGame → Tuanjie → ManualAdd → BeforeBuildForKS
SolarEngineSDK → MiniGame → Tuanjie → ManualAdd → BeforeBuildForWxChatAfter Build
SolarEngineSDK → MiniGame → Tuanjie → ManualAdd → AfterBuildForKS
SolarEngineSDK → MiniGame → Tuanjie → ManualAdd → AfterBuildForWxChatMini-Game Backend Configuration
Please refer to the Mini-Game Platform Backend Configuration section.
Wechat(weixin): https://help.solar-engine.com/en/docs/Configure-Weixin-Official-Accounts-Platfrom
Douyin: https://help.solar-engine.com/en/docs/Configure-Douyin-Open-Platform
Kuaishou: https://help.solar-engine.com/en/docs/Configure-Kuaishou-Open-Platform
Only need to configure either "China Mainland" or "Non-China-Mainland", then click "Apply".
Because some data from the SDK is stored in AppData\LocalLow\Company Name (replace with your project name)\Product Name (replace with your project name)\com.solarengine, it is necessary to delete this file when the software is uninstalled.
Here's a .bat script:
@echo off
rem Define the path of the cache directory to be cleaned
set "cacheDir=%LOCALAPPDATA%\..\LocalLow\Company Name (to be replaced)\Product Name (to be replaced)\com.solarengine"
echo The value of cacheDir is: %cacheDir%
rem Clean the cache directory
if exist "%cacheDir%" (
echo Cleaning the game cache directory...
rd /s /q "%cacheDir%"
echo The game cache directory has been cleaned.
) else (
echo The game cache directory does not exist, no need to clean.
)
echo All cleaning operations are completed.
pausePlayer Settings---> Other Settings--->Predefined Permissions
Add the following permissions, as shown in the figure.
ohos.permission.INTERNET//Required permission, allowing the app to send network requests.
ohos.permission.GET_NETWORK_INFO//Required permission, allowing the application to detect network status.
ohos.permission.APP_TRACKING_CONSENT//Required permission, allowing the application to obtain OAID. Note: The SDK must be initialized after this permission is obtained; if this permission is missing, it will affect device attribution.
ohos.permission.STORE_PERSISTENT_DATA//Required permission, allowing the application to retain the distinctID when uninstalled, which is used for device attribution.
If obfuscation configuration needs to be enabled during packaging, please add the following code to the obfuscation configuration file.
-keep
./oh_modules/@solarengine/coreCurrently, only the Export Project method is supported for packaging.

For packaging, you need to check "Create Xcode Project"

When the application is first launched after install, the SDK is pre-initialized. During pre-initialization, the SDK does not collect any personal information or report data to SolarEngine.
Function
public static void preInitSeSdk(string appKey)Sample Code
SolarEngine.Analytics.preInitSeSdk("appkey");This configuration class is used to fine‑tune service capabilities and data‑collection behaviors during SDK initialization. Its parameters fall into three categories: core‑feature switches, auxiliary feature switches, and data collection switches.
The config returned by this method is optional. If not set, the default values will be applied.
Sample Code
SEConfig seConfig = new SEConfig();
seConfig.logEnabled = true;It controls the enablement or disablement of core SDK capabilities, directly determining whether core services such as attribution and analytics take effect.
Note: Disabling relevant core feature switches will disrupt the data reporting. You will no longer be able to fully utilise all functions within SolarEngine dashboard.
| Method | Type | Required | Description | Platforms | Example |
|---|---|---|---|---|---|
| enableAttribution | bool | no | Whether to enable SolarEngine attribution service. Enabled by default. Disabling it will turn off all attribution relevant capabilities, including attribution results, deferred deeplink and deeplink, etc. If the analytics service is disabled at the same time, the SDK will stop reporting all data. | iOS Android HarmonyOS | config.enableAttribution=true; |
| enableAnalytics | bool | no | Whether to enable SolarEngine analytics service. Enabled by default. Disabling it can make all analytics features unavailable, such as A/B testing and online parameter. If the attribution service is disabled at the same time, the SDK will stop reporting all data. | iOS Android HarmonyOS | config.enableAnalytics=true; |
It controls non‑core operational behaviors of the SDK, including its running mode, debug logs, network policies, authorization waiting, and auxiliary features such as deferred deeplink.
| Parameter | Type | Required | Description | Platforms | Example |
| logEnabled | bool | No | Whether to enable local debug logs. Disabled by default. | iOS Android HarmonyOS Mini Game Windows MacOS | config.logEnabled=true; |
| isDebugModel | boolean | No | Whether to enable debug mode. Disabled by default. Before using, please check function description | iOS Android HarmonyOS Mini Game Windows MacOS | config.isDebugModel=true; |
| isGDPRArea | bool | No | Whether it belongs to the GDPR region (Default false) | iOS Android | config.isGDPRArea=true; |
| isEnable2GReporting | bool | No | Whether to report events in 2G network. Disabled by default. | iOS Android | config.isEnable2GReporting=true; |
| adPersonalizationEnabled | bool | No | Whether users allow Google Ads to use their data for ad personalization,developers can customize this value. The field is not reported by default when left unset. Valid only on Android. iOS does not support this field, no configuration needed. | Android | config.adPersonalizationEnabled=true |
| adUserDataEnabled | bool | No | Whether users allow Google Ads to use their data for ad personalization,developers can customize this value. The field is not reported by default when left unset. Valid only on Android. iOS does not support this field, no configuration needed. | Android | config.adUserDataEnabled=true |
| isCoppaEnabled | bool | No | Whether COPPA compliance is supported. Disabled by default. | iOS Android | config.isCoppaEnabled=true |
| isKidsAppEnabled | bool | No | whether Kids App mode is supported. Disabled by default. | iOS Android | config.isKidsAppEnabled=true |
| deferredDeeplinkenable | boolean | No | Whether to enable deferred deeplink. Disabled by default. | iOSAndroid HarmonyOS | config.deferredDeeplinkenable=true; |
| authorizationTimeout | number | No | Maximum waiting duration for user authorization result, in milliseconds. The SDK's internal waiting duration is used by default. | HarmonyOS | config.authorizationTimeout=120; |
| fbAppID | string | No | If overseas developers need Meta attribution, set the Meta appid here. This parameter takes effect only on Android. iOS does not support this field and no configuration is required. | Android | config.fbAppID=""; |
| enableSeparatedAttribution | bool | No | Whether to enable new attribution feature. After enabled, corresponding attribution results can be retrieved quickly. | iOSAndroid HarmonyOS | config.enableSeparatedAttribution=true; |
MiniGameInitParams Parameter Description
| Parameter | Description | Type | Required |
|---|---|---|---|
| openid | Mini Game Open ID (If not provided, SDK will obtain the current Open ID automatically, but you must fill in the AppID and AppSecret in SE dashboard App Management; and configure it in Douyin/WeChat backend. See Backend Configuration.) | string | no |
| anonymous_openid | Mini Game anonymous_openid (If not provided, SDK will obtain the current anonymous_openid automatically. You must fill in the AppID and AppSecret in SE dashboard App Management, same as openid. This parameter is only available for Douyin.) | string | no |
| unionid | mini game unionid | string | no |
| isInitTencentAdvertisingGameSDK | Follow:WeChat Mini Game Supports Tencent Event Callback | ||
| reportingToTencentSdk | |||
| tencentAdvertisingGameSDKInitParams | |||
It controls whether data such as IPv6, OAID and UA is collected.
Note: Disabling corresponding data collection parameters will impair attribution and analytics services, and you will not be able to use relevant functions normally on SolarEngine dashboard.
| Parameter | Type | Required | Description | Platforms | Example |
|---|---|---|---|---|---|
| enableIPV6 | bool | No | Whether to collect IPv6 address. Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableIPV6=true; |
| enableLanguage | bool | No | Whether to collect device language. Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableLanguage=true; |
| enableLocale | bool | No | Whether to collect device locale. Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableLocale=true; |
| enableTimeZone | bool | No | Whether to collect device time zone. Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableTimeZone=true; |
| enableScreenWH | bool | No | Whether to collect screen width and height. Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableScreenWH=true; |
| enableDensity | bool | No | Whether to collect screen density. Set to false to disable collection. Default true (enabled). | Android/HarmonyOS | config.enableDensity=true; |
| enableNetworkType | bool | No | Whether to collect network status. Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableNetworkType=true; |
| enableUA | bool | No | Whether to collect User-Agent (UA). Set to false to disable collection. Default true (enabled). | iOS/Android/HarmonyOS | config.enableUA=true; |
| enableOAID | bool | No | Whether to collect OAID. Set to false to disable collection. | Android/HarmonyOS | config.enableOAID=true; |
| enableODID | bool | No | Whether to collect ODID. Set to false to disable collection. | HarmonyOS | config.enableODID=true; |
| enableAAID | bool | No | Whether to collect AAID. Set to false to disable collection. | HarmonyOS | config.enableAAID=true; |
| isImeiEnabled | bool | No | Whether to collect IMEI. Set to false to disable collection. | Android | config.isImeiEnabled=true; |
| isAndroidIDEnabled | bool | No | Whether to collect Android ID. Set to false to disable collection. | Android | config.isAndroidIDEnabled=true; |
| withDisableOAIDRetry | bool | No | Whether to disable OAID retry. Default false. | Android | config.withDisableOAIDRetry=true; |
| withDisableGAIDRetry | bool | No | Whether to disable GAID retry. Default false. | Android | config. |
Funtion
public static void initSeSdk(string appKey, SEConfig seConfig)Parameter Description
| Parameter | Description | Type | Required |
|---|---|---|---|
| appKey | AppKey you obtained in Step 1 | String | Yes |
| seconfig | SolarEngine SDK configuration | SEConfig | Yes |
Sample Code
SEConfig seConfig = new SEConfig();
seConfig.logEnabled = true;
SolarEngine.Analytics.initSeSdk("appkey",seConfig);
//Mini Game Initialization Example
SEConfig seConfig = new SEConfig();
MiniGameInitParams initParams = new MiniGameInitParams();
initParams.anonymous_openid = "your anonymous_openid";
initParams.unionid = "your unionid";
initParams.openid = "your openid";
seConfig.miniGameInitParams = initParams;
seConfig.logEnabled = true;
SolarEngine.Analytics.initSeSdk("appkey",seConfig);
//HarmonyOS Initialization Example
//Request OAID Permission
private void RequestPermissionsFromUserHandler()
{
#if UNITY_OPENHARMONY&&!UNITY_EDITOR
SolarEngine.Analytics.requestPermissionsFromUser(callback);
#endif
}
private void callback(int code)
{
//code : 0:Success 1:Fail 999:Error
Debug.Log( " requestPermissionsFromUser : " + code);
SEConfig seConfig = new SEConfig();
seConfig.logEnabled = true;
SolarEngine.Analytics.initSeSdk("appkey",seConfig);
}
This function is used to track the initialization results, to make sure the SolarEngine SDK is successfully initialized before you proceed with the following steps.
Parameter Description:
| Parameter | Description | Type | Required |
|---|---|---|---|
| appKey | The appkey you can get from SolarEngine dashboard. | string | YES |
| seConfig | SolarEngine SDK configurations | SEConfig | YES |
Sample Code
//Initialization
SolarEngine.Analytics.preInitSeSdk("appkey"); //PreInit should be called first.
SEConfig seConfig = new SEConfig();
seConfig.logEnabled = true;
seConfig.initCompletedCallback = onInitCallback; //Here put initCallback into SEConfig.
SolarEngine.Analytics.initSeSdk("appkey", seConfig);
//InitCallback
private void onInitCallback(int code) {
///please refer to the codes below
}Initialization callback codes:
| code | meaning |
|---|---|
| 0 | Initialization success |
| 101 | Initialization failed, as pre-initialization is not called |
| 102 | Initialization failed, due to illegal appkey |
| 103 | Initialization failed, due to null context (Android only) |
| 104 | Initialization failed, due to missing distinct_id (Android only) |
The SDK provides an interface to obtain attribution result information, allowing developers to use the attribution data for event tracking and other logical processing.
SolarEngine SDK provides two methods for obtaining attribution result information.
1. Set attribution result callback: When the SDK successfully or fails to obtain the attribution result, a callback will be given (asynchronous).
2. Get attribution result directly: Get the attribution results directly from the SDK cache. If the SDK has no attribution results yet, it will directly return nil (synchronous).
Function
public struct SEConfig
{
...
public Analytics.SEAttributionCallback uaAttributionCallback { get; set; }
public Analytics.SEAttributionCallback reAttributionCallback { get; set; }
}Sample Code
private void InitSDK()
{
SEConfig seConfig = new SEConfig
{
enableSeparatedAttribution = true,
uaAttributionCallback = OnUAAttributionReceived,
reAttributionCallback = OnREAttributionReceived
};
Analytics.initSeSdk(AppKey, seConfig);
}
private void OnUAAttributionReceived(
int code,
Dictionary<string, object> attribution)
{
HandleAttribution("UA", code, attribution);
}
private void OnREAttributionReceived(
int code,
Dictionary<string, object> attribution)
{
HandleAttribution("RE", code, attribution);
}
private void HandleAttribution(
string type,
int code,
Dictionary<string, object> attribution)
{
Debug.Log(
$"SEUnity: {type} attribution, code={code}, " +
$"data={JsonConvert.SerializeObject(attribution)}");
if (code == 0)
{
// Attribution success
}
else
{
// Attribution failed
}
}Important: For callback‑based attribution result retrieval, configure attribution listeners prior to invoking initialize. Defining listeners post‑initialization may cause imprecise attribution data. See the sample code above.
The method for directly retrieving attribution results returns the local cache. If the local cache has not been generated yet, the attribution result will be null.
Function
// Get new user attribution data
public static Dictionary<string, object> getUAAttributionData()
// Get re-targeting attribution data
public static Dictionary<string, object> getREAttributionData()Sample Code
Dictionary<string, object> uaAttribution = SolarEngine.Analytics.getUAAttributionData();
Debug.Log("[unity] getUaAttribution = "+ uaAttribution);
Dictionary<string, object> reAttribution = SolarEngine.Analytics.getREAttributionData();
Debug.Log("[unity] getReAttribution = "+ reAttribution);Attribution error code descriptions and detailed attribution results can be found in:
https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details
Attribution error code descriptions and detailed attribution results can be found in:
https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details
{
"app_platform": "minigame",
"app_type": "",
"appkey": "",
"attribution_method": "",
"brand": "HUAWEI",
"channel_id": "-1",
"channel_name": "organic",
"collector_version": "1.0.1.0",
"container_name": "",
"country": "CN",
"current_event_time": "",
"custom_params": {
"_app_name": "",
"_browser": "",
"_channel": "",
"_city": "chaoyang",
"_country": "CN",
"_country_code": "CN",
"_distinct_id_type": "1101",
"_event_type": "1",
"_experiment_group_id_list": "[]",
"_group_id_list": "[]",
"_is_first_day": "true",
"_is_first_time": "true",
"_lib": "5",
"_log_count": "0",
"_page_title": "",
"_province": "bj",
"_referrer_title": "",
"_screen_height": "800",
"_screen_width": "360",
"_sdk_type": "unity",
"_source_type": "sdk",
"_sub_lib_version": "1.0.1.0",
"_type": "event",
"ecpm_rate": "1",
"ip_upload": "111.203.237.82",
"random_user_id": "2998000746001017891",
"se_pro_id": "787"
},
"device_id": "",
"device_id_type": "",
"install_time": "1727335959338",
"integration_type": "sdk",
"ipv4": "111.203.237.82",
"language": "zh_CN",
"model": "JEF-AN20",
"openid": "",
"os": "android",
"os_version": "31",
"query_info": {
"gsid": ""
},
"report_time": "1727335958766",
"scene_id": "other",
"unionid": "",
"result": "organic"
}
Mini-Game:
| Parameter | Example | Description |
|---|---|---|
| app_platform | minigame | Platform of the app |
| app_type | Platform type:wechat、douyin | |
| appkey | Appkey in the SolarEngine backend | |
| attribution_method | Attribution method: Passthrough Attribution (URL), Click Attribution (click) | |
| brand | HUAWEI | Device Vendor |
| channel_id | -1 | Channel ID |
| channel_name | organic | Attribution channel name |
| collector_version | 1.0.1.0 | Collector version |
| container_name | Host App Name, Douyin Exclusive | |
| country | CN | Country |
| current_event_time | Current Event Time | |
| custom_params | Event custom parameter nesting | |
| device_id | Attribution device unique ID | |
| device_id_type | Device ID type | |
| install_time | 1727335959338 | Install time |
| integration_type | sdk | Integration method. Fixed as 'sdk'. |
| ipv4 | 111.203.237.82 | User public network IP v4 version |
| language | zh_CN | Device Language |
| model | JEF-AN20 | Device Model |
| openid | Unique user ID within the current mini-program | |
| os | android | Host App Operating System Platform |
| os_version | 31 | Host App Operating System Version |
| query_info | Query information obtained from the mini-program platform, SE carried parameters + channel additional parameters | |
| report_time | 1727335958766 | Time received by the server |
| scene_id | other | Scene Value |
| unionid | Douyin exclusive, unique anonymous user ID within the current mini-program | |
| result | organic |