I am trying to remove a created user defined trackable from the system. At the moment I have modified the sample DefaultTargetEventHandler script that is on the user-def prefab to include a function I can call to remove the trackable. Digging through the code a bit I found a destroy trackable call I could make from the StateManager which I could get from the trackable.
StateManagerImpl sm = TrackerManager.Instance.GetStateManager() as StateManagerImpl;
This seems to neatly remove the behaviour from the event handler lists and also destroy the game object for me but when I hold up the target I used to create it with I still get log messages from the system like:
Num trackables detected: 1
Num trackables detected: 0
So clearly the tracker recognition is still in the system. It looks to me like something also has to be removed from the dataset but I can't figure out how to hook my way into it to call the DataSetImpl.Destroy() function that looks like it does everything that I need (including the StateManager destroy call I have done already).
Any pointers would be appreciated.