I’m new to AR development using Unity, and I’ve been trying to do a simple AR plane detection using mobile camera, but with no success.
Apparently Unity has updated their AR features recently, and now you can only use XR Origin instead of AR Origin which is deprecated (the tutorial I’m following basically tells me to use AR Origin + AR Session).
The problem is that I can’t find any content for it out there - everything that I’ve found just uses AR Origin + AR Session.
When I try using XR Origin + AR Session, I build and run on my iPhone and just get a black screen. I have updated my iOS to 16 recently, but it wasn’t working before either.
If you’re looking for very simple examples, Unity does provide public samples located at this link: https://github.com/Unity-Technologies/arfoundation-samples
This should cover IOS and allow you to see the latest up-to-date examples for plane detection.
I have created tutorial for basic setup with the latest AR Foundation, here is the link. This is just the basic setup and I am planning on creating tutorial for plane tracking soon.
@WyattBUnity tried the github samples and it worked - although I’m having a hard time to understand how it was done and what actually was done within each project. At least it worked so I’ll use this for now.
Ideally @xiennastudio I’m looking forward to seeing your plane tracking video to learn how to do it. Should I subscribe to your channel or is there other channels where I can follow you to keep up to date?
Hey @andyb-unity I’ve actually seen these two videos and unfortunately their step by step doesn’t apply to the newer versions of Unity and AR Foundation ): with XR Origin replacing AR Origin, a lot has changed and the fundamentals seem to be different now as well.
But thanks for the input!! These are definitely amazing creators.
I’m happy to hear it! I’m currently working on the plane tracking video so hopefully I will be able to upload it soon. For now I only have that one channel, thank you for the subscribe!
Hey, not sure if this is going to help, but one silly mistake that I do is, sometimes I forget to check the Apple ARKit in XR Plug-in Management. Check that once if you haven’t.
Hi, I have uploaded the plane detection ‘Tap to Place’ video tutorial for the latest AR Foundation 5 with XR Origin and AR Session. Sorry that it takes quite a while.
black screen
i’m guessing the black screen is bc your camera’s [xr origin > camera offset > main camera] “clear flag” is set to “solid color” and your background color is set to black. if you set the “clear flag” to “skybox”, you’d see unity’s skybox.
what i’m assuming your problem is, and i’m having this issue as well, is how to get the camera to display your real world environment. with “ar session origin” and “ar origin”, this was trivial. with “xr origin”… i’m not sure what to do
after referencing the ar foundation sample, it seems like the issue was that the “main camera” was missing an “ar camera background” component