Hi, I’ve encountered a potential issue with Unity 6 when building for iOS.
Issue: Calling WebCamTexture.Play() results in an infinite loop on a specific setup.
Environment
Unity version: 6
Platform: iOS
Device: MacBook Air (M1, Apple Silicon)
Toolchain: Xcode
Steps to reproduce
Build an iOS app using Unity 6 with WebCamTexture implemented.
Deploy the build to an M1 MacBook Air via Xcode.
Grant camera permissions when prompted.
Call WebCamTexture.Play().
Observe the app behavior: the app appears to enter an infinite loop.
Additional Information
The same app works correctly on the following devices:
Android devices and iPhone.
This suggests the issue may be specific to the M1 MacBook Air or Apple Silicon architecture.
Request
Has anyone else experienced this issue?
Are there known workarounds or fixes for using WebCamTexture in this environment?
Any help or advice would be greatly appreciated.
I have prepared a test Unity package and the relevant Xcode log files.
My Test Environment
Unity Version: 6 (6000.0.28f1)
Device: MacBook Air M1, 2020 (macOS Sequoia 15.1.1)
Xcode Version: 16.1
Steps to Reproduce
Created a new project using the 2D Mobile template in Unity 6000.0.28f1.
Imported the provided Unity package.
Set the Company Name and Camera Usage Description in the Build Profile.
Built the project for iOS.
Opened the project in Xcode, selected My Mac (MacBook Air M1) as the target, and clicked Build and Run.
Observations
The logs confirm that the process enters an infinite loop during WebCamTexture.Play().
I tested both front-facing and rear-facing camera devices by checking isFrontFacing, but the issue occurred in both cases.
Hey, I managed to reproduce this issue on my side on my M1 Macbook Pro and created a bug report for it for further investigation. Thanks for all the provided info!
I have issues of infinite loop when using custom build profile after switching to android platform. Endless loop of import starts because of plugins that use SetScriptingDefineSymbols.
I was forced to comment out automatic setting of script define symbols for all plugins, but there is some that i can’t change code (don’t have source) like Odin Inspector, so i’m forced to delete these plugins.
Unity versions i checked issue on - 6000.0.23 6000.0.24 6000.0.30
Found another person who has similar issue on github: