Log in or register to post comments

Changing the ImageTarget at runtime

January 23, 2018 - 2:30am #1

Hi,

I'm trying to change the ImageTarget at runtime but I can't find what I have to do. I need to instantiate a prefab and dynamically set the ImageTarget.

I don't seem to have access to the dropdown menu in script and I don't see any method or variable related to that list of targets.

I already tried multiples examples but none of them seems to work (for example, this one https://developer.vuforia.com/forum/faq/unity-load-dataset-setup-trackables-runtime don't work because the object tracker is always null).

Can someone help me to change the image target at runtime ? Is it even possible ?

Changing the ImageTarget at runtime

January 24, 2018 - 12:22am #3

Hi Strasza,

I tried to run the script in an empty GameObject with and without some targets activated.

This method always returns null : TrackerManager.Instance.GetTracker<ObjectTracker>();

My scene contains the ARCamera and some ImageTarget (and the default Unty objects). The delayed initialization isn't checked.

What am I missing ? Where/when am I supposed to run the script ?

Changing the ImageTarget at runtime

January 23, 2018 - 9:33am #2

Hello DJacquemin,

When are you running this? Is your VuforiaBehaviour object disabled? The ObjectTracker should only be null if Vuforia isn't activated unless you have manually disabled this.

Thanks,

Vuforia Support

Log in or register to post comments