Menu

Douyin Mini Games Support Douyin Cloud

Initialize SolarEngine(SE) SDK After Successful Douyin Cloud Initialization

Note: For cloud mini games, you must call preInitSeSdk to pre-initialize the SDK on every cold start.

Example Code:

if (StarkSDK.IsCloudInitOver)
 {
  InitSDKCallback();
}
else
 {
  StarkSDK.StarkCloudInitOverEvent = () => {  InitSDKCallback();};
 }
             
 public void InitSDKCallback()
{
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;
//Pre-initialization
SolarEngine.Analytics.preInitSeSdk("appkey");
SolarEngine.Analytics.initSeSdk("appkey",seConfig);  
}

1. Android SDK (Not Previously Integrated with SE)

Simply add the SOLARENGINE_BYTEDANCE_CLOUD macro to package the APK for the Douyin Cloud game.

2. Android SDK (Previously Integrated with SE)

The SE Android SDK might affect the packaging of the Douyin Cloud game APK. We provide a function to remove the Android SDK with one click.

Click [SolarEngineSDK --> SDK Edit Settings] to open the SolarEngineSettings panel.

Change the setting to a checked state, then click Apply.

3. Local Development Debugging

If you need to run the mini game's internal logic within the Unity Editor environment (using the local debugging provided by the cloud game side), add the SE_DEV macro definition. Please ensure this macro definition is removed when building the APK.

   

Previous
ODMInfo Attribution
Next
WeChat Mini Games Support Tencent Event Callbacks
Last modified: 2026-09-18Powered by