Unity3d发布IOS9应用时出现中文乱码的解决方法
时间:2021-02-02 10:11:33|栏目:iOS代码|点击: 次
简单的说,解决方法就是批量修改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(); }
上一篇:iOS开发之路--微博新特性页面
栏 目:iOS代码
下一篇:iOS UIScrollView滚动视图/无限循环滚动/自动滚动的实例代码
本文标题:Unity3d发布IOS9应用时出现中文乱码的解决方法
本文地址:http://www.codeinn.net/misctech/55722.html