Hello,
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(); mVuMarkManager.RegisterVuMarkDetectedCallback(OnVuMarkDetected);
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?
Hello tanton18,
Hello tanton18,
My use-case is different. Let
My use-case is different. Let's say I'm showing text over a certain Vumark. But the text is really data from a server. And that data changes over time which needs to be updated on the Vumark as long as it is visible on screen. That would require me to have a reference to the game object.
Hi tanton18,
Hi tanton18,
Have you figured out how to get the reference of the Vumark object? I run into the same situation now.
Thanks
[quote=tanton18]