I am building a Vumark based Unity app. I need to get the Vumark Unity object when it is detected on camera. I know that I can get it in the Update() function of any MonoBehaviour. In the sample Unity Vuforia Vumark scene this part of code creates a callback for when a Vumark is detected.
mVuMarkManager = TrackerManager.Instance.GetStateManager().GetVuMarkManager();
public void OnVuMarkDetected(VuMarkTarget target)
Debug.Log("New VuMark: " + GetVuMarkString(target))
I would like to get the object in this "OnVuMarkDetected" method so that I don't have to keep checking for it in the Update() method. But I don't see how.
Can anyone help?
When you have a "VuMarkTarget" instance, is it possible to get its "VumarkAbstractBehaviour"?
I tried calling "mVuMarkManager.GetActiveBehaviours()" in the method "OnVuMarkDetected", but it returns an empty Enumerable. But as I said , it works in the Update() method of any Unity object, however it doesn't work in "OnVuMarkDetected". Why is that?