1. unity导出xcode工程有两种模式,一种为模拟器运行的工程,一种为真机运行的工程,这里遇到的错误,都是导出模拟器运行工程时报的错误。

错误1:

unity UnityMetalSupport Duplicate interface definition for class 'CAMetalLayer'

解决方案:

//把报错的地方的代码替换为下方代码:
@interface CAMetalLayer (category)
@property (readwrite) BOOL framebufferOnly;
@property (readwrite) CGSize drawableSize;
@property BOOL presentsWithTransaction;
@property (readwrite, retain) id<MTLDevice> device;
@property (readwrite) MTLPixelFormat pixelFormat;
@property (readonly) id<MTLTexture> texture; - (id<CAMetalDrawable>)newDrawable;
- (id<CAMetalDrawable>)nextDrawable;
@end

错误2:

Typedef redefinition with different types ('void *' vs 'struct __CVMetalTextureCach

解决方案:

解决方法很简单,在CVTextureCache.mm文件中,全局替换:
把 CVMetalTextureCacheRef 替换为 UCVMetalTextureCacheRef、
把 CVMetalTextureRef 替换为 UCVMetalTextureRef。

参考:

1.https://www.jianshu.com/p/e80980a02060 古道西风瘦啥

2.https://www.jianshu.com/p/058cb8bf0a63 古道西风瘦啥

Unity2018.4.7导出Xcode工程报错解决方案的更多相关文章

  1. 【已解决】unity4.2.0f4 导出Android工程报错:Error building Player: ArgumentException: Illegal characters in path. [unity导出android工程 报错,路径含有非法字符]

    使用unity3D开发的一个客户端,需要导出为Android工程,然后接入一些第三方android SDK. unity版本 操作系统为: OS 名称: Microsoft Windows 7 旗舰版 ...

  2. Cocos Code IDE新建lua工程报错解决方案

    今天想用cocos code IDE新建一个工程,但是控制台报错:Read json file null failed, the reason is:null.我下载的是官方3.5源码,sdk,ndk ...

  3. 修改了系统自带头文件后,Xcode会报错

    1.Xcode自带头文件的路径 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Develo ...

  4. Xcode编译报错:< Apple Mach-O Linker Warning > clang: error: no such file or directory: 'xxxx'

    Xcode编译报错概述: clang: error: no such file or directory: 'CoreGraphics' 一般原因是链接库内容导入丢失,这种的排查下target - B ...

  5. [U3D 导出Xcode工程包,用Xcode给U3D脚本传递参数]

    1.导出Xcode工程 File->Building and setting,导出IOS工程(有错误会失败) 2.运行Xcode工程,在Classes文件夹的UI文件夹里,早到UnityAppC ...

  6. android studio java工程 报错

    作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 313134555 @qq.com  android studio java工程 ...

  7. xadmin后台导出时gunicorn报错ascii

    django + xadmin + nginx + gunicorn部署后,xadmin后台导出model数据报错,gunicorn日志记录为:UnicodeEncodeError: 'ascii' ...

  8. 导入android sdk samples工程报错"did you mean to use @+id instead of @+android:id?"

    导入“D:\adt-bundle-windows-x86_64-20140702\sdk\samples\android-15”中的工程报错 did you mean to use @+id inst ...

  9. Xcode出现报错,但是没有给出详细信息,可以看这里

    Xcode出现报错,"Xcode build:clang: error: linker command failed with exit code 1 (use -v to..." ...

随机推荐

  1. Spring学习总结(6)-@Component和@ComponentScan注解

    参考文档:https://docs.spring.io/spring/docs/5.2.0.RELEASE/spring-framework-reference/core.html#beans-ste ...

  2. 在新的线程中使用session 出现的问题

    Exception in thread "Thread-15" java.lang.IllegalStateException: No thread-bound request f ...

  3. 10分钟 Castle.Windsor 适配 Asp.Net Core 3.0

    Asp.Net Core 3.0以上,不再能通过修改Starup.ConfigureServices返回值(IServiceProvider),所以只能调用IHostBuilder.UseServic ...

  4. Weblogic 连接 RMI 服务报错 Connection refused

    WebLogic 连接 RMI 服务报错 Connection refused 访问 WebLogic RMI 服务报错,连接被拒绝,连接超时. 奇怪的是,报错的 host 根本不是我要访问的. 报错 ...

  5. 你可以 CRUD,但你不是 CRUD 程序员!

    什么是务实 务实程序员他们总是在面临问题时,透过问题看到本质,从具体的场景出发,从大局着想,了解整个问题的来龙去脉,他们会对自己的行为负责,在项目面临问题时,他们不会撒手不管或者任由风险一步步扩大直至 ...

  6. DB2根据报错代码查看表与字段信息

    select * from syscat.tables where tbspaceid='?' and tableid='?' select * from syscat.columns where t ...

  7. [C#] (原创)一步一步教你自定义控件——02,ScrollBar(滚动条)

    一.前言 技术没有先进与落后,只有合适与不合适. 本篇的自定义控件是:滚动条(ScollBar). 我们可以在网上看到很多自定义的滚动条控件,它们大都是使用UserControl去做,即至少使用一个P ...

  8. 【NOI2015】荷马史诗 - 哈夫曼树

    题目描述 追逐影子的人,自己就是影子 ——荷马 Allison 最近迷上了文学.她喜欢在一个慵懒的午后,细细地品上一杯卡布奇诺,静静地阅读她爱不释手的<荷马史诗>.但是由<奥德赛&g ...

  9. sizeof的用法 2007-12-19 11:06

    sizeof的作用是什么?sizeof是C/C++中的一个操作符(operator),简单的说其作用就是返回一个对象或者类型所占的内存字节数.其返回值类型为size_t,在头文件stddef.h中定义 ...

  10. linux驱动之定时器的介绍和内核时间的学习

    本文章摘自下面的网友: http://blog.sina.com.cn/s/blog_6e5b342e0100m87d.html 一.内核中如何记录时间 任何程序都需要时间控制,其主要目的是: 测量时 ...