List
One Trackable Behavior used with multiple map files at runtime?
Posted Date: 2019-01-10 19:29     Edited Date: 2019-01-14 1:21     Writer: inactive

Hello!

1. 4.0.2
2. Unity Android/iOS
3. Object and Image Trackers

Is it possible to use one ImageTrackableBehavior/ObjectTrackableBehavior and swap out the 2d/3d map files at runtime? 

Or does each 2d/3d map file need to be set to its own TrackableBehavior GameObject?

 

Thank you,

Ethan

Posted Date: 2019-01-11 0:50     Edited Date: 2019-01-11 0:50     Writer: slkim

https://github.com/maxstdev/MaxstARSDK_Unity_Sample

You can find NoImageTrackable Scene.
That Scene is made for No Trackable GameObject.
and for change between 2dmap or 3dmap, you need some rule.

startTracker(image)->addmap->loadmap
stopTracker->destoryTracker->startTracker(object)->addmap->loadmap.

thank you.

Posted Date: 2019-01-11 21:09     Edited Date: 2019-01-11 21:09     Writer: inactive

Hello!

Mmmm I think you misinterrupted my question. I was not asking if I could have one TrackableBehavior with either a 2d or 3d map. Let me try and write it more clearly; sorry about the confusion I caused. I want to do this...

In the unity scene have one ObjectTrackableBehavior.

In the unity scene have a Tracker Manager that has references to let's say 6 different 3dmaps.

At runtime, press a button that changes the .3dmap reference in the ObjectTrackableBehavior and tracks the new 3d map. So at runtime I can track first .3dmap, hit the button, track second .3dmap, hit the button, track third .3dmap and so on.

Hopefully this is clearer.

Have a nice weekend,

Ethan

 

 

Posted Date: 2019-01-14 1:21     Edited Date: 2019-01-14 1:21     Writer: slkim

just use AddTrackerData

AddTrackerData(file1)-> hit button-> removeTrackerData(file1)->AddTrackerData(file2)-> hit button-> removeTrackerData(file2)->AddTrackerData(file3)

thank you.