Skip to content

Unity

This tutorial explains the setup of the Unity sample Project of the Track framework. This project showcases the capabilities of the Track framework when being used in Unity.

Info

To use this sample project you need to acquire a track license key here

This project is made for Unity 2022.3.13f1.

The sample project consists of two main sample scenes and a menu:

  • Track Standalone Scene: Showcasing how to set up a simple scene that is able to track two simple targets.
  • TRACK_IMAGE_000
  • TRACK_QR_000 These targets can be found on our sample targets page.

Note

The TRACK standalone scene can also be executed in the editor mode by pressing play in the Unity editor, if a USB camera is present.

  • Fusion Tracker Scene: Showcasing the use of the TRACK framework alongside the AR Foundation API.

Note

Since this utilizes AR Foundation, this scene needs to be deployed to an Android or iOS device for testing. It can not be executed in the Unity editor.

Set up and deploy project

  1. Download the sample project from this page.

  2. Make sure the TRACK Unity package and the AR Foundation Package are added to the project.

    • Go to Window -> Package Manager
    • Select Packages: In Project in the top menu
    • Ensure that AR Foundation and VIRNECT Track are present
    • Go to Edit -> Project Settings -> XR Plug-in Management and ensure that ARCore (Android) or ARKit (iOS) are checked.
  3. Go to VIRNECT Track -> Track Settings to register your license key.

  4. Go to File -> Build Settings. There, switch to the platform the build will be deployed to (Android or iOS).

  5. Go to Edit -> Project Settings -> Player and make sure the settings are the same as here.

  6. Going back to File -> Build Settings, select the device where the build will be deployed. Click on Build and Run.

Testing the built app

  1. Open the installed app.

  2. Click on the Standalone TRACK button. The targets that are enabled for this scene are the TRACK_IMAGE_000.track image target, and the TRACK_QR_Code_000.track QR code target. You can find both of them here.

  3. Go back to the main menu.

  4. Click on the Fusion Tracker button to go to the fusion tracker scene. The target that is enabled for this scene is the TRACK_IMAGE_000.track image target. You can find it here.