Can you please tell me on which devices does this crash occur? Does the crash also happen when running the example project provided, without any changes to it?
Can you please provide more information about what you are trying to do? The Wikitude camera should behave as any other Unity camera, so it is not clear why this switch is required.
This is on an Iphone 6s. I have an standalone app using wikitude instant tracker prefabs and wikitude camera prefabs where I switch between AR Instant tracker and normal Unity scene based on certain criteria similar to Pokemon Go. I noticed memory issues when the AR scene is active for more than a minute (not in the sample app). so to avoid this I'm trying to switch off InstantTracker when not needed.
So i tried setting the InstantTracker gameobject to true/ false which resulted in immediate app crash. The second thing i tried was setting the state of the Instant tracker from Tracking to Initializing. This does not crash immediately but after a minute in the AR scene there is a crash and the error message reads
Message from debugger: Terminated due to memory issue.
The app also gets memory issues when the Instant Tracker is active in the Initializing state for a long time. I did not see this in the Sample project only in my project.
So could you please help me in figuring out what I'm wrong to get so many memory crashes?
Would it be possible for you to send me your project at firstname.lastname@example.org. Or a similar project where these issues are reproducible. Since they don't happen in the sample project, it would be difficult to debug it otherwise.
I've sent the project to email@example.com. Hope you guys can shed some light.
I also have another question: Can I use the Front facing camera instead of the rear one for AR?
Is it even possible? If so how can I do it?
Thank you for sending the project. I will have a look at it as soon as possible.
Regarding your question, yes, it is possible. On the WikitudeCamera object, just set the DevicePosition property to CaptureDevicePosition.Front:
// camera is a valid WikitudeCamera reference camera.DevicePosition = CaptureDevicePosition.Front;
You can also have a look at the "Changing Camera Settings" sample provided, as well as the CameraSettingsController.cs script associated with it.
awesome thanks Alexandru
Hi, I'm using the Instant Tracker prefab and whenever i try to switch its state from Tracking to Initializing, there is a memory warning and the app crashes.
Secondly, when there is no 3d model to render in Instant tracker and the tracker is in Tracking mode, there is a memory warning.
I'm trying to switch between the wikitude camera and the Unity camera based on button press.
I'm using the latest wikitude Unity plugin.