?> Snowplow Unity Tracker 0.4.0 released | Snowplow
Snowplow ‘Outperforms’ GA4 in GigaOm Comparative Evaluation.
Read More
  1. Home
  2. Blog
  3. Releases
Releases

Snowplow Unity Tracker 0.4.0 released

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:

  1. Updates to .NET Standard 2.0
  2. Improvements to Event Storage
  3. New Demo Unity Game
  4. Updates and bug fixes
  5. Upgrading
  6. 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.

var emitter = new AsyncEmitter(collectorUrl, HttpProtocol.HTTPS, HttpMethod.POST, 500, 52000L, 52000L, new EventStore("filename.db", true));

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.

demo

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 TrackerManager.cs and GameplayManager.cs scripts.

4. Updates and bug fixes

New features

  • 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)

Bug fixes

  • 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)

5. Upgrading

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.

Finally, if you run into any issues or have any questions, please raise an issue or get in touch with us via our Discourse forums.

More about
the author

Paul Boocock
Paul Boocock

Paul is a Head of Engineering and enjoys spending his time thinking about Snowplow use cases, the ethics of data collection and user privacy. He works mainly with the teams responsible for the Snowplow Trackers and Data Models.

View author

Ready to start creating rich, first-party data?

Image of the Snowplow app UI