unity DestroyBuffer can only be called from the main thread
2016-02-24 14:59
1521 查看
DestroyBuffer can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
多线程时会产生这个错误
还有使用设备延迟或者卡住的时候也会产生这个错误(比如kinect造成)
另外调试的时候程序切换后台也有一定几率导致这个错误(可以试试user setting里面开后台运行)
更多参考
http://answers.unity3d.com/questions/830973/c-calling-destroy-in-a-custom-class-destructor.html http://forum.unity3d.com/threads/destroy-can-only-be-called-from-the-main-thread-useless-error.262494/ http://www.cnblogs.com/jiangjieqim/p/4500861.html
相关文章推荐
- AdMob的Android应用程序添加(Unity,Eclipse可以)
- unity touch
- UnityException: Input Key named: Fire1 is unknown
- Unity 5.X扩展编辑器之打包assetbundle
- Unity 5.X扩展编辑器之打包assetbundle
- 谷歌移动广告Unity插件
- 在Unity中截屏需要注意的问题
- Unity Interface Serialization-Expose Interface field In Inspector
- unity, AnimatorCullingMode的一个bug
- Unity Android平台的AdMob的应用
- 整合谷歌分析和AdMob到Unity3D
- [增强现实]Unity制作AR增强现实--茶壶(亲测)
- 用DropBox分享Unity3D的Web应用
- unity3d 获取cpu序列号,硬盘ID,网卡MAC地址等硬件可用于加密
- unity 3d快熟使用KGFMapSystem开发小地图
- [基础教程] Unity3D Terrian地形设置中文教程
- 教你怎样用unity3d发布一个Android的apk文件.绝对精细。
- unity3d关于keyCode的总结
- 如何在Unity 3D中设置Google AdMod
- [实例开发教程] Unity3D 创建迷你地图中文教程 附源码