I am developing an AR app where i need to haver 2D and 3D recognition (Not at the same time) i managed this by destroying one tracker before instantiate the other when needed.
The issue is, that i found that destroying my object tracker while an object is currently tracked and later instantiate an image tracker will end on a crash.
If I did the same exact operation without the object being currently tracked it works fine, so i'm a bit lost on how to solve this issue.
Thanks for your support,
Forgot to mention that i'm using wikitude 8.3 for unity.
We are doing a similar thing, switching between image targets and object targets because you cannot have both at the same time. If the tracker is loading targets and you do anything else to it, such as destroying it, enabling or disabling it, it will crash. It will crash the app, or in the Unity editor it will crash the editor. You must wait until the OnTargetsLoaded event has triggered before doing anything to the Tracker.
First of all thanks for your answer
But, this does not seem to be the problem. Because the problem only happens when an object is currently being tracken and then it's deleted while it's being tracked.
It also will only happen if after that you instantiate an Image tracker, if you instantiate another object tracker it will work fine, even if its other WTO file.
I couldn't reproduce the issue using the project from the downloaded package in the Unity Editor. Does this issue only happen on device? If so, on which devices are you testing and which version of Unity are you using? Does the crash happen all the time, on all devices you're testing on?
Also, I would recommend using the latest version of the SDK, if possible, since this issue might be already resolved there.
I am using unity 2018.3.4f1 and wikitude 8.3. and it is happening to me in unity editor and app.
The easiest way i found to replicate the issue is in unity editor.
Instantiate an object tracker and recognize an object, then destroy the object tracker while the object is being recognized (While the ObjectTrackable and its drawable are active), then just instantiate an active image tracker.
This cause my unity editor to crash always.
Thanks in advance,
I could reproduce it in SDK 8.3, but it doesn't seem to happen anymore in 8.5. Have you tried updating to the newest version? Is it still happening there for you?