Unity3d发布IOS9应用时出现中文乱码的解决方法
程序员文章站
2022-05-16 11:35:21
简单的说,解决方法就是批量修改ngui的label字体,修复ios就删除arial引起的中文乱码
我们来看具体如何操作
static public void y...
简单的说,解决方法就是批量修改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(); }
下一篇: 几步高速提升UI设计作品的逼格