Log in or register to post comments

Dynamic Amount of ImageTargets (creating in Runtime)

December 28, 2019 - 7:36am #1

Hello There,

I'm looking for days how to create an ImageTarget within the runtime.

For now it doesn't seems possible. I can create a GameObject. Add the Components

it needs to have (like ImageTargetBehaviour, DefaultTrackableEventHandler etc.).

However trying to set ImageTargetType to database type doesn't compiles, since ImageTargetTyp is an readonly.

Also I can't see the type for database. In Unity Editor, within the ImageTargetBehaviour component, possible types are

From Image, From Database, User Defined and Cloud Reco. ImageTargetType has CLOUD_RECO, INSTANT, PREDEFINED, USER_DEFINED.

Is INSTANT the equivalent for "From Image" and PREDEFINED for "From Database"?

I'm not sure, if this is even the right way to accomplish my task.


The application should have a big amount of targets in the database and will work

position-driven (position as in the real world -> gps-position). So let say I have three

different streets with a 100 targets in each of them. If the gps-position of the

user shows, that he is in a particular street, the application should load just the 100

targets for this street to the scene.


Instantiating and destroying ImageTargets from Offline-Database in the

scene. Adding child elements to it, which should be placed on the trackable

target ondetect.

Dynamic Amount of ImageTargets (creating in Runtime)

January 8, 2020 - 2:50am #2


In order to create ImageTargets at Run-time please review the below link. https://library.vuforia.com/content/vuforia-library/en/articles/Solution/how-to-create-and-load-targets-in-unity.html // section: How to create an Image Target from a texture asset in the Unity Editor.

I will provide a short description for all database types:

From Image: is at run-time, meaning you can add pictures and create ImageTargets to be displayed.

From database: you create the Image Targets via the Target Manager

Cloud reco: database stored on the cloud

User defined: User-defined targets are Image Targets that are created at runtime from camera frames selected by the user. They share most of the capabilities of a standard Image Target with the exception that they do not support Virtual Buttons.

In regards to your use-case, if you choose to use "From Database" you will need to first create them via the Target Manager. The rest of should be managed via app logic.

Thank you.

Vuforia Engine Support

Log in or register to post comments