-
What is the (best and working) way to switch between front and back cameras with Unity MARS?
I have tried to make two scenes: first scene with some image trackers (for World effect) and second which is unmodified face mask template scene. Unfortunately no matter what (if I start with the first scene and use SceneManager to load the second scene or simply start with the second scene) the second scene is not working properly on my phone but in in Device View it works without issues. The second scene on my phone doesn’t show face landmarks and uses world camera. -
After that I have set up another test. The second scene only uses RawImage and WebcamTexture with the feed from the front WebcamDevice. There is no MARS Session for second scene there. I was able to track images and switch scenes to see myself via front camera, but after I wanted to switch back to the first scene the trackers stopped to work. How can I reset MARS Session after I switch scene with SceneManager.LoadScene?
The error which is looping in the XCode debug:
I use iPhone SE and iOS
MARS 1.0.2 with MARS AR Foundation 1.0.2
ARKit XR Plugin 2.1.9
ARKit FaceTracking 1.0.7
Unity 2019.4 (might it be the issue?)