Hi !
I’m looking to migrate an existing project that use AR Foundation without Mars.
I’ve set up a new project (Unity 2021.1.4f1), and Mars is working fine.
Now, on a new scene, I’m trying to make Mars and AR Foundation work together. This is an important step for me as my app is depending on using things like the ARRaycastManager, ARPlaneManager, ARAnchorManager, etc.
So I just create an AR Session and AR Session Origin, and I add the Mars Session. On the Device view, everything’s working fine. However in play mode, the camera seems to be stuck, and I can’t move it like I do on the Device view. If I manually move up the camera on the Scene, it’s still not working.
The origin of the camera or any of it’s parent is set properly to 0,0,0.
Am I missing something here ?
I have some warnings like :
No active UnityEngine.XR.ARSubsystems.XRSessionSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
But from what I’ve read this is expected as I’m running the app in the editor.
- Android build
- AR Foundation 4.1.7
- Mars 1.3.1
- ARcore 4.1.7
Thanks !
Hey there!,
Could you check that you have activated the XR Subsystem by going to Edit → Project Settings → XR Plug-in Management and make sure the MARS Simulation checkbox is enabled?
It is important to check that no other providers (checkboxes) are selected since when entering Play mode in the editor, Unity will use the first selected provider in the list.
Hi @CreepyInpu ,
Can you also check that you have ‘Initialize XR on Startup’ checked in Edit → Project Settings → XR Plug-in Management as well. If for you need to manage the XR startup for your app, we can work with you to further resolve the issue.
Hi,
Thanks both of you ! It seems to be working. I did not have “MARS Simulation” enabled. What was confusing for me is that this option is under the “Windows” tabs but my project is set on Android. On the Android tabs I have “ARcore” checked, is that correct ?
Yes, that’s correct.
It’s a bit confusing since because simulation only works in the editor (and not on device) it only appears under the editor platforms in XR Plug-in management. So whether you’re deploying to Android, iOS, UWP etc. simulation is accessible to you on your editor platform.
Alright, I’ll be careful now. Thanks a lot, and keep up the great work
Unfortunately I can’t access that video link, but to confirm: When you press the play button you can’t move the camera using the right mouse button in the game view tab?