Menu

TopOn Unity3D Plugin (2.0.0+) import instructions

Plugin Introduction

Plugin 2.1.1

  • Region: The plugin provides two region options: China (ChinaMainland) and Overseas. This is only used for Android to download the appropriate region's networks. iOS supports global release and either region can be used.
  • AndroidX: A collection of support libraries for developing Android applications, applicable only to the Android platform. Selecting Default means the AndroidX setting will follow the Unity editor. Selecting enable means the plugin will modify the project to be in an AndroidX environment when the program runs.
  • AdMob AppId: If AdMob is installed, you need to fill in the AdMob AppId for the corresponding platform.

Plugin Import

Follow these steps to import the plugin:

  1. Open Unity, and sequentially select Assets > Import Package > Custom Package.
  2. Select the Unity plugin file you downloaded.
  3. In the Import Unity Package dialog, click Import.
  4. After importing the plugin, check the Unity menu bar options and click AnyThink to open the plugin.

Note: If there is an old plugin and you need to upgrade it, you need to delete the Assets/TpnPlugin folder.

Integration Environment

  • Unity 2019.x.x or higher.
  • Android Build: You need to check "Custom Main Gradle Template" and "Custom Gradle Properties Template" as shown in the image below.
  • iOS Build: If Bitcode is enabled, your build will fail. Apple deprecated Bitcode in Xcode 14. The AnyThink plugin requires CocoaPods. If CocoaPods is not installed, you can follow the instructions in the CocoaPods Getting Started Guide to install CocoaPods.
  • After installing dependencies using CocoaPods, an xcworkspace project file will be generated. Please use this file to enter the project and perform subsequent operations.

Notes

iOS Pre-Compilation and Runtime Settings

If you have chosen to integrate third-party ad platform SDKs that contain dynamic libraries (e.g., YLH, Pangle, AppLovin, Kuaishou, InMobi, Kwai, etc.), integrated via CocoaPods, and encounter an error similar to the following at runtime:

Copy
xxxxxxxxx/Frameworks/GDTMobSDK.framework/GDTMobSDK' (no such file)

You need to check and manually handle it by following the three steps shown in the image below (using Kuaishou as an example; similar errors can be identified by the SDK name shown in the console log. Process the SDKs that appear in the console log errors one by one, such as GDTMobSDK in the example above):

iOS Pod Network Error / Unable to Pod Successfully

Please try adding the GitHub source at the very top of the Podfile and removing other sources. Ensure that the current network can access GitHub. If there is a proxy, check whether the terminal has the proxy enabled.

Please try switching to the GitHub source. Ensure that the current network can access GitHub. If there is a proxy, check whether the terminal has the proxy enabled.

Copy
source 'https://github.com/CocoaPods/Specs.git'

Android Cache Handling

Before building Android, to avoid the influence of caches causing some networks not to be integrated, it is recommended to click Force Resolve by following these steps:

Menu Bar Assets > External Dependency Manager > Android Resolver > Force Resolve.

UnityAds Ad Platform

If you need to integrate the UnityAds ad platform, please confirm whether the Unity ad plugin has been introduced in the Package Manager (Window > Package Manager) of the Unity project. If so, please remove it before integrating; otherwise, it may cause integration conflicts and issues such as the Google Play store review not passing.

Previous
SDK import instructions
Next
Unity SDK initialization
Last modified: 2026-07-03Powered by