"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

get the ID of a Vumark

Hello,

I'm newbie in Vumark. I want to make a simple app that get the ID of a trackable Vumark and depending on the ID, It swap the 3D model.

For example :

public VumarkTarget vumark;

public Gameobject teapot;

public Gameobject tower;

 

if (vumark.ID = 1)

{ teapot.setactive(true);

tower.setactive(false);}

else {

teapot.setactive(false);

tower.setactive(true);

}

 

I wonder how can I instantiate my vumark via editor or via script like I can do to Gameobject (teapot and tower) ? I read the vumark sample and the imagetarget sample but I couldn't understand how I instantiate my vumarktarget to get its ID.

 

Thanks for helping

 

After a deep observation of the Vumark Sample app, I come up with this script which works perfectly. Tower and Teapot are two 3D models that I have assigned them in the editor inspector :

 

[quote]

To answer your question directly:


1 - Update() is a continuous loop that runs over and over as long as your application is running.

2 - foreach is another form of loop but these are specific and need direction like "loop through each vumark".