1. 程式人生 > >unity(使用了NGUI) 在Build時遇見DontSave but is included in the build

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

clu fonts 自動生成 tsa included image sources ext lag

錯誤提示:

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