Closed Bruce-yu199 closed 1 year ago
@Bruce-yu199 - I noticed that you're using v4.2.6 of AR Foundation and ARKit packages. This is an older patch. Can you try using the latest v4.2.7 and check if you can still reproduce the issue? https://docs.unity3d.com/Packages/com.unity.xr.arkit@4.2/changelog/CHANGELOG.html#427---2022-10-31
Closing this issue due to inactivity. Feel free to re-open if you have further questions. This issue should be resolved if you update to AR Foundation 4.2.7 or newer.
Describe the bug The function TryAcquireLatestCpuImage causes the preview to freeze on IOS. I have tried #1057 and #1010 but failed.
To Reproduce Put the following MonoBehaviour on a GameObject in the scene: `using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems;
public class TestXRCpuImage : MonoBehaviour { private IEnumerator Start() { public ARCameraManager _cameraManager; _cameraManager.frameReceived += OnCameraFrameReceived ; while(true) { TryShowLatestCpuImage(); yield return new WaitForEndOfFrame(); } }
}`
Then build the app for IOS.
Expected behavior The image is returned and nothing happens.
Actual behavior When i build it to my iPad and run it, The first frame is returned and then image in the screen freezes no matter what pose i do. No errors are logged to the console about this. The application itself isn't locking up since all other functionallities still work like expected, it's just the camera preview. I found that _cameraManager.TryAcquireLatestCpuImage(out var image) always gives me the same image(the first frame) which caused the screen freezing.
Smartphone (please complete the following information):