码迷,mamicode.com
首页 > 编程语言 > 详细

unity(使用了NGUI) 在Build时遇见DontSave but is included in the build

时间:2017-06-10 17:09:01      阅读:2245      评论:0      收藏:0      [点我收藏+]

标签:source   sim   blog   sources   生成   res   include   windows   ext   

错误提示:

An asset is marked with HideFlags.DontSave but is included in the build:
Asset: ‘Library/unity editor resources‘
(You are probably referencing internal Unity data in your build.)
UnityEditor.HostView:OnGUI()

 

 

原因:这是由于NGUI字体上不支持中文,而使用unity默认字体时在Build就会出错.

解决方案:自己创建一个支持中文的字体库,可以使用系统自带的字体

步骤:

1.打开我的电脑 在C:\Windows\Fonts 目录下找一个合适的字体拖进unity,我这里使用的是SIMSUNB字体,拖进后如图:

技术分享

里面会自动生成一个材质和一个Texture

2.在Hierarchy面板创建一个空物体,添加UI Font(script),字体类型和材质设置如图:

技术分享

 

unity(使用了NGUI) 在Build时遇见DontSave but is included in the build

标签:source   sim   blog   sources   生成   res   include   windows   ext   

原文地址:http://www.cnblogs.com/lichuangblog/p/6978690.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!