Hello!
I’m working on my AR app. So, before starting any AR action I want to check if the device supports AR features.
I looked how it’s done in AR Foundation Samples (GitHub - Unity-Technologies/arfoundation-samples: Example content for Unity projects based on AR Foundation), I tested it on my phone and it works well.
So, I decided to implement similar algorithm in my app. What I got is that it works a bit differently than the ‘Check Support’ sample.
The difference is that the sample app checks for AR support almost immediately as the sample starting, without even requiring some camera frames.
My code can’t get ARSessionState.Ready if the camera view is blocked by something (and we see a dark screen). ARSessionState is always equal to SessionInitializing.
There is also some difference in my code and sample code. Sample app consists of couple different scenes, and ARSession.CheckAvailability() starts just when the scene starts. My code has single scene, and CheckAvailability() might be called anytime later while the app running.
The question is how to deal with this kind of behaviour in my app (checking requires camera frames). Can I achieve the same behaviour as in the sample app without creating separate scene to check AR support? Should I really wait ARSessionState to become Ready to be sure that device supports AR features? Or does SessionInitializing already mean that AR works well on my device?
Thanks!