-
关闭Metal API Validation
Unity的工程在XCode 9下运行启动会crash,错误为 failed assertion `Texture at depthAttachment has usage (0x01) which doesn’t specify MTLTextureUsageRenderTarget,网上一搜可以有三种方法解决:
https://stackoverflow.com/questions/46323219/unity-4-6-9-game-crashes-in-xcode-9-ios-11
采用关闭XCode的Metal API Validation功能后,工程运行就不再Crash了。Metal API Validation功能位于Scheme Editor Settings中,如图所示,选择Disable即可
-
require 和 require_noerr
require 和 require_noerr宏指令在Xcode 9下发生改变,不再在AssertMacros.h中声明,修改方法是将require改为__Require, 而require_noerr则改为__Require_noErr。据说还有另外一种修改方法,可参考:https://stackoverflow.com/questions/46221364/xcode-9-throws-errors-involving-require
- 本文固定链接: https://freemanapp.com/zh/?p=324
- 转载请注明: freeman 于 FreemanApp 发表