Log in or register to post comments

Create a user defined target and use it in a different scene?

May 28, 2013 - 8:50am #1

Hello,

I have a scene "Create new target" to create a user defined target. If the image quality is good and the new target is created, it loads the "main menu" scene and from there you can load another scene where I want to put a "UserDefinedTarget" prefab with that previously created target.

My question, is there a way to save that user defined target and use it in another scenes?

I could try to keep the new "UserDefinedTarget" gameobject through the scenes, but I think it would be very dirty.

Create a user defined target and use it in a different scene?

January 2, 2017 - 10:29pm #7

Is there any update on this thread?

Vuforia SDK v6.2.6 - Release Note says this

Vuforia is initialized and deinitialized only once per application instead of every scene

 

So my understanding is, if i save a User Defined Target, this will stay until i kill the app and even if i change to different scenes 

Create a user defined target and use it in a different scene?

June 3, 2013 - 3:25am #6

Oh, you mean regenerate it completely taking new image from the camera... Thanks.

Then I will use only one scene(what a mess!) until that feature is released.

Create a user defined target and use it in a different scene?

June 2, 2013 - 4:57pm #5

You'll need to regenerate the UDT in the 2nd scene. They can't be persisted across scenes. This is a feature that we hope to enable in a future version of the SDK.

Create a user defined target and use it in a different scene?

June 2, 2013 - 4:00pm #4

So, how to regenerate the target? I tried to save the trackableSource object generated from the camera image in the 1st scene to use it to create a new dataset in the 2nd scene and instantiate a new UDT, but when I set the dataset to active, the editor crashes :(

 

Here is my code, maybe you think it's an aberration:

public class CreaNuevoTrackeable : MonoBehaviour {
	
	private ImageTracker mImageTracker;
	private DataSet mDataSet;
	private TrackableSource mTrackableSource;
	private ImageTargetBehaviour ImageTargetTemplate;

	// SetTargetUser is an static class to keep the created objects.

	void Start () {
		mImageTracker = SetTargetUser.mImageTracker; //(ImageTracker)TrackerManager.Instance.GetTracker(Tracker.Type.IMAGE_TRACKER);
		
		mTrackableSource = SetTargetUser.mTrackableSource;
		
		ImageTargetBehaviour imageTargetCopy = (ImageTargetBehaviour)Instantiate(ImageTargetTemplate);
		
		mDataSet = mImageTracker.CreateDataSet();

		mDataSet.CreateTrackable(mTrackableSource, imageTargetCopy.gameObject);
		
		mImageTracker.ActivateDataSet(mDataSet);
		
		Destroy(gameobject);

	}
	
}

 

Create a user defined target and use it in a different scene?

May 30, 2013 - 4:29am #3

Thanks for your reply.

Maybe I explained wrong, actually I don't need to export anything(so the cloud thing would be a very extreme solution). I just need to create a trackable from the camera in the first scene to use it in the second scene. Maybe is there a way to re-use it to build a new UDT from the previusly created trackable?

I'll keep looking in the documentation and trying the code to understand how that works.

Create a user defined target and use it in a different scene?

May 28, 2013 - 9:27am #2

There is no way to export the trackable created by the UDT prefab, though you can submit the image to our Cloud Recognition service so that it can be re-used and shared. But in your case, I think that the easiest approach will be to use UDT in both scenes and to regenerate the target is the second scene.

Log in or register to post comments