google-ar / arcore-unity-extensions

Google ARCore Extensions and Geospatial Creator for Unity's AR Foundation
Other
347 stars 97 forks source link

Build with XCode14 camera frame is cracking #89

Open tokageD opened 2 years ago

tokageD commented 2 years ago

When building with the latest XCode 14, the camera frame is constantly crackling. This is similar to the problem reported on the Unity side, but without ARCoreExtensions (without geospatialAPI) this problem does not occur.

Unity's Fixed issue:

The problem occurs when running the geospatialAPI sample in the following environment.

WintorJesseVanBloemenhuis commented 2 years ago

I have the same issue with cloud anchors API, without geospatial API. Running the scene without the ARCoreExtensions script has no frame stutters.

I really need a fix for this ASAP, it's critical to our app.

tomkrikorian commented 2 years ago

Having the same issue here. Can you confirm you are working on a fix ?

tomkrikorian commented 2 years ago

Looks like the issue might be from iOSSupportManager and the call to TryGetLatestFrame :

                if (!_cameraManager.subsystem.TryGetLatestFrame(
                        cameraParams, out XRCameraFrame frame))
                {
                    Debug.LogWarning("XRCamera's latest frame is not available now.");
                    return;
                }

There is a discussion about a performance issue when calling this method over at the ARFoundation Samples github : https://github.com/Unity-Technologies/arfoundation-samples/issues/988#issuecomment-1252802839

spee commented 1 year ago

The samples project of ARFoundation works for me, but as soon as I install ARCore Extensions, including Cloud Anchors, and I add it to the sample scene SimpleAR, the FPS drops so low that tracking stops working altogether (instantiated planes disappear). Other sample scenes without the ARCore Extensions game object keep working fine.

Unity 2021.3.10f1 ARFoundation / ARCore / ARKit 4.2.6 ARCore Extensions 1.33.0 — with Cloud Anchors enabled Xcode 14.0 iPhone 12 Pro with iOS 16

tomkrikorian commented 1 year ago

The issue is gone on my device (iPhone 12 Mini) with: ARFoundation / ARCore / ARKit 4.2.3 MultiThread rendering disabled iOS 16.0.2 installed (new update)

The issue comes back when using ARFoundation / ARCore / ARKit 4.2.6.

lores3000 commented 1 year ago

I can reproduce the issue on xCode 13.4.1 and on a device with iOS 15.5 - Using ARCore Extensions 1.33.0 and ARFoundation 4.2.6.

So this seems to be an issue between the latest ARCore Extensions and ARFoundation packages.

Thank you @tomkrikorian for the info regarding multithreaded rendering and reverting to 4.2.3 - this has fixed the issue for me.

TimmyBest commented 1 year ago

Have this issue as well but the revert is not an option anymore. Thank you Unity and Google. We love you https://forum.unity.com/threads/see-all-versions-command-was-removed.1008619/

piecake-sukedai commented 1 year ago

ARkit XR Plugin 4.2.7 has been released. This issue seems to have been fixed in 4.2.7.