Search Issue Tracker
Fixed in 2021.3.28f1, 2022.2.22f1
[iOS] Metal Shader error is thrown when loading prefab on iOS device
1. Download the attached project "ios.zip"
2. Open a terminal window and run the following command:
"<Unity-path> -quit -batchmode -projectPath <project-path> -executeMethod TempBuildScript.BuildPlayer -force-glcore -buildTarget ios"
3. Run the Generated Xcode Project on an iOS device
Expected result: No errors are thrown in the Xcode Console and a Model is seen in the Build
Actual result: The prefab cannot be seen in the Build and the following error is thrown:
"Metal: Error creating pipeline state (Universal Render Pipeline/Lit): Fragment input(s) `user(TEXCOORD4)` mismatching vertex shader output type(s) or not written by vertex shader"
Reproducible with: 2020.3.35f1
Not reproducible with: 2019.4.39f1
Could not test with: 2021.3.3f1, 2022.1.3f1, 2022.2.0a15 (the terminal command fails to produce a properly working build, see notes for more information regarding reproduction)
iPhone 13 (iOS 15.0)
- After a build is performed, the same issue can be observed in the Editor by playing the "_Temp/TempScene" Scene. However, this behavior appears to be device-dependent. It was observed on the following macOS machine:
macOS: 12.3 (21E230)
iMac (Retina 5K, 27-inch, 2017)
3,4 GHz Quad-Core Intel Core i5
Radeon Pro 570 4 GB
- The Editor reproduction of the issue appears to be dependent on the outcome of the iOS build. The Editor reproduction has been observed in 2022.2.0a15, however, that was only after it was upgraded from 2020.3.35f1 and a build that threw unrelated errors was made. On 2022.1.3f1 the build crashes on launch and after that, the Editor does not reproduce the issue
- Reproduction appears to be device-dependent. Not all macOS machines appear to produce builds that reproduce the issue on iOS, however, the above machine is able to consistently reproduce the build that causes the issue
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Sprite Editor Window not visualizing changes when selecting different Filter Modes
- Crash on UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline () when opening a project
- The Texture Shape of an Image changes from 2D to a Cube when the project is upgraded to 2019 and above
- Building 3D Sample Scenes (URP) Project fails
- Alpha channel is disabled when Alpha Clip Threshold is set to 0