Removing tracker data on runtime
Hello again, yet another question. How to remove tracker data on runtime? I do like this:
trackablesPool.RemoveTrackable(_toRemove.image); // Destroys image tracker on scene
TrackerManager.GetInstance().RemoveTrackerData(_toRemove.image_path); // removes tracker data??
TrackerManager.GetInstance().LoadTrackerData(); // need to load ??
_target.Remove(_toRemove); // delete data from database
_toRemove = null;
But it gives key not found exception on ImageTrackerSample in Update. Here:
for (int i = 0; i < trackingResult.GetCount(); i++)
{
Trackable trackable = trackingResult.GetTrackable(i);
imageTrackablePool[trackable.GetName()].OnTrackSuccess( <------- Exception
trackable.GetId(), trackable.GetName(), trackable.GetPose());
}
Thank you.
Hello.
It seems like unity timing issue.
Before "LoadTrackerData()" was applied in the image tracker, _toRemove.image was removed from trackablesPool.
So I'd like to recommend that you remove _toRemove.image after a while, not right now.
It would be helpful.
Thanks.
John,
MAXST Support Team