Unity Migration Guide

Unity

Migration Guide

Overview

Version 3.0.0 of the Kochava Unity SDK is a substantial overhaul which adds new support for VR (Oculus Rift and HTC Vive), MacOSX, Linux, Windows Desktop and WebGL (in addition to iOS and Android).

Integration

Before importing the new unity package you must delete some of the old Kochava SDK files which are no longer used. Delete the following files if they exist before importing the new package:

  • Assets\Plugins\Android\_KOCHAVA_SAMPLE_AndroidManifest.xml
  • Assets\Plugins\Android\KochavaSDK.jar
  • Assets\Plugins\Android\KochavaUnity.dll
  • Assets\Plugins\iOS\KochavaUnity.dll
  • Assets\Plugins\Kochava\_Kochava Analytics.prefab
  • Assets\Plugins\Kochava\KochavaEditor.cs
  • Assets\Plugins\Kochava\KochavaUnity.dll
  • (any remaining files will be replaced)

 

You will also need to remove your existing _Kochava Analytics object from your scene if it exists. A new prefab will be provided. Before doing this make sure to save your current App GUIDs as they will be cleared when removed.

Now that you’ve removed the deprecated files you’re ready to import the new SDK (version 3.0.0). Please refer to the new SDK Integration section of the support documentation from this point.


Code Changes

Much of the public facing code implementation is nearly identical, except that the KochavaUnity namespace has been replaced directly with the Kochava class. The result is that you can simply replace any calls to KochavaUnity with Kochava. For example, KochavaUnity.Tracker.SendEvent() is now Kochava.Tracker.SendEvent(). Other behavior changes are described below.

 

IdentityLink:

This is now set using the SetIdentityLink() method anytime after initialization. If you were previously setting this within Tracker.Config you can now call SetIdentityLink() immediately after Kochava initialization.

 

Attribution Handler:

Setting an attribution handler is now easier and does not vary by platform. Use the Tracker.SetAttributionHandler() method to set your handler for any platform if needed.

 

Initialization:

If you were initializing Kochava within code (rather than using the prefab) please refer to the new SDK Integration section for detailed instructions regarding code-based integration.

 
 

Last Modified: May 3, 2018 at 5:49 pm