The TUNE Unity plugin 5.x introduces some new ways to include the native TUNE SDKs and dependencies. The migration involves adding a new helper package to manage the dependencies.
- For a clean install, you may want to delete your existing files in /Assets/Tune and /Assets/Plugins. If you have other files you need to keep, you may refer here for a list of files from the 4.x plugin that can be deleted: https://github.com/tuneinc/unity-plugin/tree/v4.5.1/sample/Assets
The 5.x plugin moves most of the plugin files into the /Assets/Tune folder in order to be self-contained and separate from the rest of your Assets files.
- The 5.x plugin uses Google's Unity Jar Resolver (https://github.com/googlesamples/unity-jar-resolver) plugin to resolve dependencies and perform version management.Please download and import this package into your project.
- Import the new Tune.unitypackage file.
- After importing, Unity Jar Resolver should read the contents of /Assets/Tune/Editor/TunePluginDependencies.xml and import the libraries listed in the file.
On Android, the /Assets/Plugins/Android folder should now contain all the imported libraries.
On iOS, since Unity Jar Resolver uses CocoaPods, when you build your iOS project you should now open the generated ".xcworkspace" file instead of the ".xcodeproj" file. The workspace will contain all library dependencies in addition to your project source.
Unity 5 Compatibility
If you're building on Unity 5, there's an issue with the Tune script using an API call that's not available on Unity 5.
You can comment out the following line in TunePostBuildTrigger.cs (line:84):
If you are using in-app marketing, you will simply need to add the push capability in Xcode yourself in place of this line.
Building with Gradle for Android
If you're building your Android project with Gradle (https://docs.unity3d.com/Manual/android-gradle-overview.html), you can comment out the Android dependencies in `/Assets/Tune/Editor/TunePluginDependencies.xml` and instead simply add the TUNE SDK dependency to your .gradle file:
You may need to add the Google repo to the “repositories” in your mainTemplate.gradle file:
If you're using in-app marketing, you'll also want to include: