Just looking for the most basic, simple directions to get AR working for Android Unity 2022.3

Following the tutorials but they require 2019. Watched a number of youtube videos but still have issues. I got a few of the unity mobile AR tutorials to work over the weekend, but now all of a sudden I just get a black screen and errors like:
“Saving has no effect. Your class ‘UnityEditor.XR.Simulation.XREnvironmentViewManager’ is missing the FilePathAttribute. Use this attribute to specify where to save your ScriptableSingleton.
Only call Save() and use this attribute if you want your state to survive between sessions of Unity.
UnityEditor.XR.Simulation.XREnvironmentViewManager:OnDisable () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.7/Editor/Simulation/XREnvironmentViewManager.cs:169)”

I love unity but am beyond frustrated right now as I can’t even get the most basic build to work setting up with AR Core project and selecting Android as the build platform. I can only think to uninstall Unity yet again and reinstall but there must be something I’m missing. Thanks for any help.

2 Likes

Hi, I have created tutorials about AR Foundation in Unity 2022/2023, here is the link: https://www.youtube.com/playlist?list=PLK43KwqG-UmjIU3AaWZc-Heev_6lIM69l
Hopefully it will help with fixing the issue.

thank you so much! I finally figured it out, but will definitely watch your tutorials as well. for anyone wondering why you have a black background when building AR apps, as I struggled with, in your XR Origin add a camera, tag it as Main Camera. you will have a black background because you are using Unity’s XR plugin for AR applications. In AR, the camera background is usually transparent, so that the real world can be seen through the device’s screen or lens. However, in Unity, transparent backgrounds are rendered as black by default. Therefore, you need to add a component called AR Camera Background to your XR origin camera, which will replace the black background with the device’s camera feed. This is done by clicking the camera then selecting Add Component in the Inspector and searching for AR Camera Background, you also need to add AR Camera Manager. then you will see the usual skybox background. it’s been driving me crazy!

3 Likes

@ValentineCat Sounds like you are looking for scene setup docs? Scene setup | AR Foundation | 5.0.7

@ValentineCat How did you resolve the FilePathAttribute related warning? I am getting that exact same warning in Unity 2022.3.8 using AR Foundation 5.0.7.

@aleevans The FilePathAttribute issue is a known bug. You can ignore the warning for now. It’s in our queue to investigate. We weren’t aware of this issue until newer versions of the Editor started logging this warning recently.

4 Likes

any news??? @andyb-unity

2 Likes

@melitoren The FilePathAttribute warning shouldn’t have any negative effect other than an annoyingly logged warning, no? We’ve had higher priority work this month but expect to get to this in November.

1 Like

no, its not just that, we cant save nothing, scripts dont load, so we cant make anything, i lost many proyects for this error, reinstall all unity for this its absurd… any news??

2 Likes

@Demiseman It sounds like there is some other issue in your project. This FilePathAttribute warning from AR Foundation does not have any of the effects you describe. “Saving has no effect” in this case simply means that AR Foundation is unable to save the XREnvironmentViewManager, which is a minor bug that has been present since AR Foundation 5.0.

We have a patch coming out soon that will fix this warning being logged.

3 Likes

The FilePathAttribute is causing a negative effect when you try to run your AR app in the simulator. The background of the camera is cleared with a solid black color and nothing is being rendered.

The warning is followed by the error “No camera found under XROrigin.” But my camera is set up correctly. The problem seems to be caused by a second camera that is added for navigating through the simulated AR scene when you run the app in te AR simulator.

The complete error message looks as follows.

No camera found under XROrigin.
UnityEngine.XR.ARFoundation.SubsystemLifecycleManager`3<UnityEngine.XR.ARSubsystems.XRCameraSubsystem, UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider>:OnEnable () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.1.0/Runtime/ARFoundation/SubsystemLifecycleManager.cs:78)

The only way to get around this FilePathAttribute warning and error is to load a different scene and then switch back to the scene that you’re working on. This way the error disappears temporarily but it will come back each time you make a change to the scene, load assets or sometimes even when you switch to a different application and back to Unity.

@Blixem-Media The FilePathAttribute warning has no effect on the behavior you describe. It looks like your issue is the GameObject hierarchy of your XR Origin. Refer to our scene setup docs for the required setup.

1 Like