Hi guys. Somebody here with experience on Unity and iOS? More especiffic with cameras. I'm using Mars Pure and can't make the front camera works on iOS, but on Android everything is working fine. Somebody can help me, please?

I assume this is for a face tracking scene? In what way does it not work on iOS?

When it's running from Xcode do you see any errors in the log console?

Yes, is with face tracking. In a empty scene works, but when we put the UI canvas (without any script on canvas) the app open just the back camera (using mars). On Android everything works fine.

And don’t have any error on log of console of XCode.

I'm looking into this. If you are able to, can you file a bug from the editor in your project and DM me the case number? That'll help me track it down faster

On editor everything works fine, do not show up any log or error. I’m making a switch Plataform to iOS on Windows with Unity, than i make a build, and take the project to a xcode, the build is successfully, but just show the back camera.

Which version of Unity and AR Foundation are you using?

Unity 2020.3.25f1
AR Foundation 4.2.1
Mars 1.4.1
ARKit 4.1.7

Hi there!

I just completed a smoke test using these versions, and as you say, a simple test scene works, using the front camera. However, adding a UI canvas with a button did not cause the issue you are seeing; I still see my face mask through the front camera.

In your last message, you said you are using AR Foundation 4.2 but ARKit 4.1. Is this correct, or a typo? I tested with both the 4.1 and 4.2 versions of this package but both worked for me. Do you also have the ARKit Face Tracking package installed?

From our other thread, I understand that you and your team are unable to share your project but are working on an isolation project that replicates the issue. Please share this using the Unity bug reporter or provide a link to download the full project using a file sharing service like Google Drive. Once we are able to replicate the issue we should be able to provide a fix.

Thanks for reaching out and I hope we can resolve your issue soon. Cheers!

Hello guys! I have created face tracking scene with unity mars! How can I use the rare camera instead of the selfie camera?

hello @gkaras890 ,

MARS Relies on AR Foundation, which also relies on ARKit for working on iOS / ARCore for Android.
and they both don’t support face tracking on rear cameras.

I'm having the same issue. MARS with Face Mask, works fine on Android but uses the rear camera on iOS (testing on a 2017 iPad). Was there ever a resolution to this issue, or did you find out what causes it? Before I added MARS to the project I was using AR Foundation Face Tracking and it was working fine on the same iOS device.

Here is something that might be relevant from the Xcode console:

[Subsystems] Subsystem ARKit-Input already instantiated, returning reference
[Subsystems] Loading plugin UnityARKit for subsystem ARKit-Meshing...
[Subsystems] Failed to initialize subsystem ARKit-Meshing [error: 1]
No active UnityEngine.XR.ARSubsystems.XRFaceSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
Unity.XRTools.ModuleLoader.FunctionalityIsland:AddProvider(Type, IFunctionalityProvider)
Unity.XRTools.ModuleLoader.FunctionalityIsland:PrepareProviders(HashSet`1, List`1, Boolean)
Unity.XRTools.ModuleLoader.FunctionalityIsland:InjectFunctionality(List`1, List`1)

I am facing the same issue, able to make the front camera work while using ARFoundation and XRPlugin.

Please make sure that Face Tracking is enabled in Player Settings -> XR Plug-in Management -> Apple ARKit

9397802--1315382--Screenshot 2023-10-09 at 5.41.29 PM.jpg