Closed dilnuryuldashev closed 8 months ago
Initializing XR alone does not cause anything to be rendered to the screen. After initializing XR, you would need to enable an ARSession, XROrigin, ARCameraManager, and ARCameraBackground. Refer to Scene setup for more information about the necessary components.
If these components were in your scene before you initialized XR, they would all disable themselves upon discovering that XR was not initialized, and you need to re-enable them.
I tackled this issue differently. I have two separate scenes now, one AR Scene, and one non-AR Scene. I request the Camera permission in the non-AR scene manually, and then go to the AR Scene. But thanks for explaining how this is supposed to work.
Hi,
I want to start XR manually at runtime, so I unchecked "Initialize XR on Startup". Cloned this repo, and picked the Simple AR Scene, and when I run the StartXRCoroutine coroutine from the source below, I get nothing but a black screen: https://docs.unity3d.com/Packages/com.unity.xr.management@4.4/manual/EndUser.html
Even though XCode seems to be fine:
The only issue I noticed above is the [Subsystems] Failed to initialize subsystem ARKit-Meshing [error: 1] part. I wonder if it affects anything.
How can I start XR manually at runtime?
Unity 2023.2.3f1. iPhone 11. iOS 17.2.1 Custom project AR Plugin versions: AR Foundation 5.1.1. ARKit 5.1.1. AR Foundation Samples Github Project AR Plugin versions: 6.0.0-pre.5
Thanks.