下面是个简单易学的Unity3d发布IOS9应用时出现中文乱码的解决方法教程,图老师小编详细图解介绍包你轻松学会,喜欢的朋友赶紧get起来吧!
【 tulaoshi.com - 编程语言 】
简单的说,解决方法就是批量修改NGUI的label字体,修复ios就删除arial引起的中文乱码
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)我们来看具体如何操作
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)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(); }
来源:http://www.tulaoshi.com/n/20160219/1596100.html
看过《Unity3d发布IOS9应用时出现中文乱码的解决方法》的人还看了以下文章 更多>>