Try MAXST AR Fusion Tracker Now ✨
OnTrackFail() being called all the time, even when OnTrackSuccess is called.
Posted Date: 2020-05-30 15:29     Edited Date: 2020-06-02 0:42     Writer: salina.rawles

Please provide your development details as below;

1. SDK Version: 5.0.1
2. Development Environment: Unity
3. Tracker/Scanner: ImageTrackable
4. License Type(Free / Pro-One Time Fee / Pro-Subscription / Enterprise): Free
5. Target Device(Optional):


The ImageTrackableBehaviour class is constantly calling OnTrackFail() for every game object it's attached to. When an image is being tracked, OnTrackFail() is still calling as well as OnTrackSuccess() for the gameobject with the image being tracked. What needs to be fixed so that OnTrackFail() is not being called for the game object that's calling OnTrackSuccess()?

Any help is appreciated.

Posted Date: 2020-06-01 1:04     Edited Date: 2020-06-01 1:06     Writer: chjee

Hello salina.


Update() , in ImageTrackerSample.cs , you can see it calls DisableAllTrackables()

Again, in DisableAllTrackables() , you can see that it calls onTrackFail().

( * onTrackFail() is located inside ImageTrackableBehaviour.cs )

This means for every update, we disable rendered objects and re-render it.

This is basically just for our convenience. Remember that our codes are just samples, you can always modify for your own purpose.


You can use GetCount() to call onTrackFail only when the count is zero.

If you want to track a single image, code modification will be much easier.


Good luck with your project and don't hesitate for further support.



MAXST Support Team

Posted Date: 2020-06-01 11:20     Edited Date: 2020-06-01 11:20     Writer: salina.rawles

Hi Connor

Thank you for your reply.

Is it possible I could have a sample of how this would be written? I'm struggling to get this to work.


Posted Date: 2020-06-02 0:42     Edited Date: 2020-06-02 0:42     Writer: chjee

        if (trackingResult.GetCount()==0){




Inside update, in ImageTrackableSample.cs,

add this code and remove DisableAllTrackables() at the begining.

This will do the job if you are not using a multitracker function.



MAXST Support Team