復雜的說,處理辦法就是批量修正NGUI的label字體,修復IOS就刪除arial惹起的中文亂碼
我們來看詳細如何操作
static public void yaheifont() { uf = AssetDatabase.LoadAssetAtPath("Assets/yahei.prefab",typeof( UIFont)) as UIFont; UnityEngine.Object[] objs = Selection.GetFiltered (typeof(UnityEngine.Object), SelectionMode.DeepAssets); foreach (UnityEngine.Object _obj in objs) { string path = AssetDatabase.GetAssetPath(_obj); Debug.Log("objname:"+_obj.name); UnityEngine.Object[] arr = AssetDatabase.LoadAllAssetsAtPath(path); Debug.Log("PATH:"+path); foreach (Object j in arr) { if(j.GetType()==typeof(UILabel)) { (j as UILabel).bitmapFont = uf; Debug.Log("dfdfd:" + j.name + ",tyep:" + j.GetType()); } } EditorUtility.SetDirty(_obj); } AssetDatabase.SaveAssets(); }
【Unity3d發布IOS9使用時呈現中文亂碼的處理辦法】的相關資料介紹到這裡,希望對您有所幫助! 提示:不會對讀者因本文所帶來的任何損失負責。如果您支持就請把本站添加至收藏夾哦!