Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.99k stars 1.11k forks source link

[Bug] New ARFoundation project camera frame freez issue on iOS #1010

Closed DIBALABULUSH closed 1 year ago

DIBALABULUSH commented 1 year ago

Describe the bug I'm new for AR. The issue is a new 3D unity project import essential AR package and building to the iOS, but after open the app and allow the camera. The camera only ran for a second and the frame is totally freez. The UI button still can interact. Android is fine. And I try to use other AR sample build the same scene to iOS, and they can running normally. I can't figure out what i miss.

To Reproduce A new 3D unity project import essential AR package, the scene only add AR Session Origin, AR Session, Directional Light and a Button.

Expected behavior Camera should be work normally.

Actual behavior The frame was freez.

Device & Editor :

andyb-unity commented 1 year ago

Please file a bug so our QA team can take a look at your repro case: https://unity3d.com/unity/qa/bug-reporting. After you file, post the bug number here as well.

saf-a commented 1 year ago

ARFoundation and ARKit versions the same? freeze when ARFoundation(4.2.3) and ARKit(4.2.6). When I set them to 4.2.3 or 4.2.6, it worked.

fvdave commented 1 year ago

@saf-a solution worked for me. I had ARKit 4.2.6, changing to 4.2.3 resolved the issue.

andyb-unity commented 1 year ago

Closing this issue as resolved. Feel free to re-open if necessary and specify any ongoing issues.

Melo36 commented 3 months ago

Hello, I just encountered the same problem. My build was working fine until I implemented XR Origin and AR Session. I put both elements into hierarchy but haven't implemented any code. After building again the app freezes on the first frame. Both ARFoundation and ARKit have the same version, so it can't be because of that. I have reinstalled everything, but nothing seems to fix the problem. Does anybody have any ideas?

Device & Editor :

andyb-unity commented 3 months ago

@Melo36 Whatever you are experiencing is a different issue than the one posted here, which was solved by using matching version numbers between the packages. Please open a new issue.

In your new issue please also include a bug ID number as noted in the README

To report a bug in AR Foundation, please file a bug. You may also submit a GitHub issue, but we will close your GitHub issue if it does not contain an official bug ID number. The best way to ensure that your issue is addressed is to file a bug using Unity's official bug reporting process.

Melo36 commented 3 months ago

As always, right after posting a question I think I found the problem 😅 I was using WebcamTexture before I implemented XR Origin and I am guessing that it is not possible to use WebcamTexture and the AR components at the same time? I haven't solved it yet but I think it is because of that. Thanks for the quick answer though.

andyb-unity commented 3 months ago

Correct. You can't use WebCamTexture and ARKit at the same time. ARKit has its own Image capture APIs that you would need to use instead.