Our NativeX Unity Plugin download contains within it two Unity plugin packages; one for Unity 4.x and one for Unity 5.x. If you are importing the NativeX Unity Plugin for the first time, use the one that aligns with the version of Unity that you are using.
If you’ve already imported the NativeX Unity Plugin for Unity 4.x, and are upgrading to Unity 5, you can either re-import the Unity 5 specific plugin package, or follow the conversion instructions below.
Re-import NativeX Unity Plugin
If you want to re-import the NativeX Unity plugin, we suggest first deleting all the NativeX Unity plugin files from your project, then re-importing the Unity 5 specific .unitypackage. Specifically, these are the files/folders that should be removed:
Assets/Editor/CMVideoSamplingPatcher.cs Assets/Editor/iOS/NativeX Assets/Plugins/Android/gson-2.2.4.jar Assets/Plugins/Android/NativeXMonetizationSDK_vX.X.X.jar Assets/Plugins/Android/NativeXWrapper.jar Assets/Plugins/iOS/NativeXPlugin Assets/Plugins/NativeX
After removal, you can then import the NativeX Unity Plugin package for Unity 5.
Manually Convert the NativeX Unity plugin
If you want to convert the already imported plugin, have Unity make its suggested changes on upgrade, then follow these specific instructions:
No changes are needed for the Android related plugin; NativeX Unity plugin will work as-is with Android-based builds.
Two changes are needed for the plugin to be supported with Unity 5:
In Assets/Plugins/iOS/NativeXPlugin/NativeXCore.mm, comment out the entire “dealloc” method (lines 30-33):
You need to explicitly reference the AdSupport Framework with the NativeX library file within the
- In the Project window, navigate to Assets/Plugins/iOS/NativeXPlugin, highlight the “libNativeXSDK.a” file
- With that file selected, in the Inspector window under Platform settings, put a checkmark next to “AdSupport”
- Hit “Apply” below the Platform Settings box.
After you are done, it should look similar to this: