Check if there are active tracking going on?

0 votes
asked Aug 12, 2017 by cloudapptimize (270 points)
Hi,

Is there a way to check if there are any active image tracking going on right now?

2 Answers

0 votes
answered Aug 13, 2017 by albert52 (31,850 points)

of course.

public class EasyImageTargetBehaviour : ImageTargetBehaviour
{
    protected override void Awake()
    {
        base.Awake();
        TargetFound += OnTargetFound;
        TargetLost += OnTargetLost;
        TargetLoad += OnTargetLoad;
        TargetUnload += OnTargetUnload;
    }

    void OnTargetFound(TargetAbstractBehaviour behaviour)
    {
        Debug.Log("Found: " + Target.Id);
    }

    void OnTargetLost(TargetAbstractBehaviour behaviour)
    {
        Debug.Log("Lost: " + Target.Id);
    }

    void OnTargetLoad(ImageTargetBaseBehaviour behaviour, ImageTrackerBaseBehaviour tracker, bool status)
    {
        Debug.Log("Load target (" + status + "): " + Target.Id + " (" + Target.Name + ") " + " -> " + tracker);
    }

    void OnTargetUnload(ImageTargetBaseBehaviour behaviour, ImageTrackerBaseBehaviour tracker, bool status)
    {
        Debug.Log("Unload target (" + status + "): " + Target.Id + " (" + Target.Name + ") " + " -> " + tracker);
    }
}
commented Aug 15, 2017 by cloudapptimize (270 points)
Sorry if I was not clear. So suppose, I want to check run time that how many trackings are going on like a count? with traget names? Will it be same and tracked based on above code only?
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...