We are pleased to announce a new release of the Snowplow Unity Tracker. Version 0.4.0 brings a big update to the Unity Tracker by moving to .NET Standard 2.0 for Unity 2018.1+. It also moves to using a new Event Storage system, powered by LiteDB, for better cross platform support (including Android arm64 devices) and lastly it also brings a new demo game built in Unity 2018.4 to help test the tracker.
Read on below for:
- Updates to .NET Standard 2.0
- Improvements to Event Storage
- New Demo Unity Game
- Updates and bug fixes
- Documentation and help
1. Updates to .NET Standard 2.0
The release of Unity 2018.1 and beyond brought support for the new Stable Scripting Runtime which upgrades .NET support to .NET 4.x and .NET Standard 2.0 profiles. This new feature allows us to move to new frameworks, modern .NET libraries and a variety of improvements to our Tracker codebase by upgrading to a .NET Standard 2.0 library.
During this upgrade we have also placed considerable effort in ensuring our Tracker is capable of working on popular Unity platforms, both Mono and IL2CPP, including: Windows, macOS, Linux, iOS and Android. The Unity Tracker may also be compatible with other Unity platforms but they have not been tested as part of this release.
Our Test Framework has also been updated to run as a .NET Standard 2.0 Unity 2018.4 Project, allowing for integration testing of our Snowplow Tracker within the Unity environment. You can find our how to run the updated Test Suite on the Unity Tracker README.
2. Improvements to Event Storage
By moving to .NET Standard 2.0, this has allowed us to leverage a new storage technology that is 100% managed C# code, with no native library dependencies, called LiteDB. By doing so, we have been able to fix compatibility issues running the Unity Tracker on some Android devices (in particular on arm64 devices).
This change requires new dlls to be deployed along with version 0.4.0 of the Unity Tracker however they will automatically be included when importing the SnowplowTracker.unitypackage from our GitHub release. We advise dlls imported from previous Unity Tracker releases are deleted before importing version 0.4.0.
Additionally, we have also exposed a new IStore interface when initialising the Emitter object. This will allow users of the Unity Tracker to either alter the construction of the EventStore object, as shown below, or by creating an implementation of the IStore interface that fits the needs of the application.
3. New Demo Unity Game
We’ve also created a new demo game that has been built with Unity 2018.4. By updating our demo game to Unity 2018.4, we are able to show how to integrate the new .NET Standard version of the Snowplow Unity Tracker into a game. The game also includes a number of examples of using the Unity Tracker, such as firing tracking events during gameplay and adding custom contexts to those events.
To play the demo game and start collecting Snowplow events, open
SnowplowTracker.Demo in Unity 2018.4 by cloning the Unity Tracker repository. Once
SnowplowTracker.Demo is open in Unity, start the game by opening the
MainMenuScene.scene in the Unity Editor and pressing Play. Entering your collector URL on the menu screen will allow tracking of events into your collector. Alternatively, build and run the game on Windows, macOS, Linux, iOS or Android with keyboard and touch controls.
Example code on how to set up and use the Unity Tracker is included within the
4. Updates and bug fixes
- Migrate SnowplowTracker to .NET Standard 2.0 (#22)
- Switch to new Database library for better cross platform support (#23)
- Migrate test suite to .NET Standard 2.0 (#29)
- Expose EventStore Interface for easy extension (#32)
- Port Snowplow Demo Game to Android/iOS (#3)
- Automate build using Travis (#24)
- Include link.xml and required DLLs in Resources folder for all platforms (#30)
- Fix Mobile Paths to support Android (#18)
- Fix Peru version so vagrant up succeeds (#20)
- Update Copyright notices to 2019 (#31)
The tracker is available as a published asset in the 0.4.0 Github release:
To upgrade, please delete the existing SnowplowTracker dll files and then download and reimport SnowplowTracker.unitypackage into your Unity project.
Version 0.4.0 requires at least Unity 2018.1 as it is now built as a .NET Standard 2.0 library.
6. Documentation and help
Check out the Unity Tracker’s documentation:
The v0.4.0 release page on GitHub has the full list of changes made in this version.