Reputation: 22042
Today I launched fully working Unity3D game in Xcode 9, iPhone 6 running iOS 11. Its crashing on launch.
Every time crashing in same function : SetupMetalFBO
Here is console log:
validateRenderPassDescriptor:487: failed assertion `Texture at colorAttachment[0] has usage (0x01) which doesn't specify MTLTextureUsageRenderTarget (0x04)'
Same code worked perfect with Xcode 8.3.3 iOS 10.
How to fix crash in Xcode 9 ?
UPDATES_SOLUTION :
Solution is simple, just goto Xcode->Product->Scheme->Edit Scheme, disable Metal API Validation. This fix crash.
Upvotes: 6
Views: 3708
Reputation: 125245
The MTLTextureUsageRenderTarget
in the error shows that this is a Apple's Metal issue.
Unity 4.6.9 is extremely old to work on iOS 11 and is no longer patched to fix issues on platforms like iOS. You should also worry about your latest app being rejected from the app store due to IPv6 compatibly issues.
You have three options:
1.Disable Metal API Validation in Xcode
2.Use OpenGLES instead of Metal.
First of all, disable Auto Graphics API then change iOS Graphics API to OpenGLES2 or OpenGLES3 in Unity's Player Settings.
3.Update to Unity to the latest version of Unity if #1 and #2 fail. If you update Unity and the problem is still there then you can file for bug report from the Editor. I expect this issue to be gone if you update Unity.
Upvotes: 4