Try MAXST AR Fusion Tracker Now ✨
List
Image Tracker + Instant Tracker
Posted Date: 2020-09-22 14:13     Edited Date: 2020-09-23 8:04     Writer: tanimul.haque

Is it possible to use Image Tracker and instant tracker at the same time? Or can I switch between them? I tried a few things but it seems which ever I turn on first keeps working and the other one doesn't. 

This is what I tried,

  • Sperated the Image and Instant Tracker
  • Turned them off from the inspector
  • Enabled only one when needed
  • Turned the camera off on OnDisable()


1. SDK Version: 5.0
2. Development Environment:  Unity-Android, Unity-iOS
3. Tracker/Scanner: Image Tracker , Instant Tracker
4. License Type:Free / Pro-One Time Fee
5. Target Device(Optional):Android

 

Posted Date: 2020-09-23 1:22     Edited Date: 2020-09-23 1:22     Writer: chjee

Hello, Tanimul.

In the current state, you can't use both trackers at the same time.

However, you can switch them. You must call the singleton method TrackerManager.GetInstance().StopTracker() to stop your tracking.

Otherwise, it will remain alive. Just turning off in inspector will not likely to call that method.

Basically what happens when you turn off in inspector, is calling OnDisable, not OnDistory.

I recommend you to make your own script with ImageTrackerSample.cs and InstantTrackerSample.cs.

 

A little pseudo code for you.

SwitchTracker ( button callback )
{
    if tracker == inatant
        TrackerManager.GetInstance().StopTracker();
        TrackerManager.GetInstance().DestoryTracker();
        TrackerManager.GetInstance().StartTracker(TrackerManager.TRACKER_TYPE_IMAGE);
        AddTrackerData();
        tracker == image
    else
        ... ( change to Instant Tracker )

 

Note that this logic reloads every Tracker again and again.

I'm not sure if theres a way to hold Tracker Datas.

If this is too slow, come again and we'll figure it out.

 

Best Regards,

Connor

MAXST Support Team

Posted Date: 2020-09-23 8:04     Edited Date: 2020-09-23 8:04     Writer: tanimul.haque

Great help. thanks!

I only had to call the 

TrackerManager.GetInstance().DestoryTracker(); 

on on disable and I called the Start method from ImageTrackerSample.cs and InstantTrackerSample.cs OnEnable. And it works as I wanted. It has a small delay but It's acceptable for my case.