Log in or register to post comments

Creating ImageTargetBehaviours from dataset

May 22, 2014 - 2:16am #1

Hi,

I read with great interest the forum and the following link: https://developer.vuforia.com/resources/dev-guide/swappable-databases-unity

...but I'm still stuck.

We are making an AR app for an exhibition with many rooms.

The 3D models or explanations are in named according to dataset/targetname.

So when one is detected, we can load the model/description and play.

So far, when we activate the AR, we load the vuforia gameobjects (AR cam + x imageTargetBehavious) from a separate scene asynchronously.

It works more or less and is a bit tricky (for instance: you cannot stop the loading in Unity).

 

My question: it seems it would be smarter (so easy to maintain) for us to do:

0/ we always have an ARCam in a single ARScene. Activated or not.

1/ when the user selects room 1, I need dataset1. We load it (code in the link above: OK)

2/ We create the gameobjects and attached ImageTargetBehaviours according to this dataset.

How do we do 2/? Seems it is not possible to select (by script) the dataset and targetName.

 

Thank you very much for anyone who can help? (this solution or a workaround..)

Michaël

 

Creating ImageTargetBehaviours from dataset

May 28, 2014 - 4:05pm #3

Creating ImageTargetBehaviours from dataset

May 28, 2014 - 1:00pm #2

You can turn on the "Keep AR Camera Alive" option in the Inspector properties for the ARCamera object in order to use the camera across multiple scenes. The check box is located in the "Keep Alive Behaviour" script component.

As described in the DataSet API and in the Dev-Guide article about swappable datasets, the Load() method can be used to get the dataset, but the ImageTarget property in the ImageTargetAbstractBehaviour class is read-only and has to be set via the Inspector panel for the target.

While the ImageTarget must be set to the appropriate image in the Inspector panel, the augmented objects may be parented under the ImageTarget object programmatically.

Log in or register to post comments