I'm currently using Wikitude Unity SDK for developing an AR Feature in my existing application. I'm unable to Switch On or Switch Off the Camera on runtime. Also, I've purchased the License for the same.
This being a feature, I cannot let the Camera be Turned on throughout the application usage. Keeping the Camera turned on in non-AR segment of the application will cause increased battery drain, and performance issues.
Any help is appreciated in advance.
This feature should work as expected. Have you tried disabling the GameObject that contains the WikitudeCamera script? Or how did you try to switch it off?
And can you provide more details about what didn't work? Did the camera still render after you turned it off? Did an error / crash occur?
Alternatively, you can have different scenes, one for AR content, which contains the WikitudeCamera and the Tracker you need, and one for non-AR content, which doesn't contain these scripts at all.
Thank You for the response. I tried what you mentioned above, but disabling the GameObject stops the Camera rendering, and doesn't free the Camera Resource (i.e the Hardware).
I tried running on Mobile Devices having in-built laser focus (OnePlus 2). On using the application, whenever I turn off the GameObject having the Wikitude Camera Script it stops the rendering, but the Camera is not released.
What I want is whenever I'm not using the AR mode, the Camera should not be in use at all. For example, when we use applications like Instagram or SnapChat, the Camera is accessed when we are on the Camera screen, else the Camera is free and not being used.
You are indeed correct and simply disabling the WikitudeCamera doesn't free the Camera at the moment. This will be fixed as soon as possible. Until then, the only option remains that you destroy the WikitudeCamera and the associated trackers, and recreate them again when you need AR content. Or split them in different scenes.
I apologize for the inconvenience.