(Last updated 21/07/2018)

Just as you would Pair your bluetooth headphones with your phone, we need to Pair the Tags with each User parts to track (Head, Gun...). And like with a bluetooth headphone, we can remember what was the last pairing in a file and automatically load the next time.

Package Overview

Pairing

Scenes

VRT_PairingExample : Example scene to show the Pairing system

Scripts

SimpleJSON.cs : Reads and write JSON file to save the Pairing

VRT_PairingManager.cs : Manage all the pairing with the Tag. Need to be on a GameObject in the Pairing Scene. Assign the Scene to Load after on this Script.

VRT_PairingUI.cs : Abstract class to handle the Pairing UI and show the user what he has to do during the pairing.

VRT_PairingUIStandardAssets.cs : Extend VRT_PairingUI to show the user how to pair, based on Unity VR Sample Scene package.

Use the Pairing Scene

VRT_PairingExample scene should be run before any scene where you want to use tracking.

Step by Step pairing

Here is how the pairing is done when you start VRT_PairingExample

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1a58a618-3340-473e-a128-52bf706dc1b3/Capturedecran2018-04-19a16.18.33.png

Try to automatically pair using saved datas, it also scans for available Tag on the Gateway.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/539a7272-733d-4d8b-bfc9-f8a43ae17ebe/Capturedecran2018-04-19a16.18.37.png

If automatic pairing failed, you have to look at the button to start manual pairing

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ecf9f800-fb8c-43ea-8758-32c3dde0b4ed/Capturedecran2018-04-19a16.18.41.png

For each Tag in your Manager, it will ask to press the Pairing button on the Tag. You have 10 seconds to press that button

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/321c25ff-4d02-4a60-836a-ebd5aa6d4894/Capturedecran2018-04-19a16.18.48.png

Same thing for the next Tag.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ea905273-9b52-471a-bca0-0902206ba522/Capturedecran2018-04-19a17.09.53.png

If you fail to press the Tag's pairing button within 10 seconds, you will have to look at the "Try Again" button to restart the pairing sequence.

Then the Scene you have linked in the VRT_PairingManager will load.

Next time you run the Pairing scene, it will automatically pair and go to the next scene in a few seconds.

Details

To do that Pairing, we created a special scene called VRT_PairingExample. This Scene is based on VRSampleScene Unity package for VR (which is why this package is included in our plugin).

First and foremost, VRT_PairingManager script needs to be in the scene. Here we have set it on a Pairing GameObject, but it can be anywhere.

Here is the list of options you can set :