当前位置: 首页 > news >正文

温州手机网站建设wmwl苏州最新情况最新消息今天

温州手机网站建设wmwl,苏州最新情况最新消息今天,微信公众号?,北京王府井大楼有些单机项目开发的时候没有做本地文本配置文件#xff0c;全部写死在场景的对象上面#xff0c;简单记录一下怎么提取场景里面的文本并且写入到配置文件里面using System.Collections.Generic;using System.IO;using TMPro;using UnityEditor;using UnityEngine;using Unity…有些单机项目开发的时候没有做本地文本配置文件全部写死在场景的对象上面简单记录一下怎么提取场景里面的文本并且写入到配置文件里面using System.Collections.Generic;using System.IO;using TMPro;using UnityEditor;using UnityEngine;using UnityEngine.UI;public class Test : MonoBehaviour{ static Liststring txtArray new Liststring(); static string labelStr _config_Label_; [MenuItem(Tools/ÌáÈ¡Îı¾)] static void GetAllSceneObjectsWithInactive() { ReadFile(); var allGos Resources.FindObjectsOfTypeAll(typeof(GameObject)); var previousSelection Selection.objects; Selection.objects allGos; var selectedTransforms Selection.GetTransforms(SelectionMode.Editable | SelectionMode.ExcludePrefab); Selection.objects previousSelection; int index 0; foreach (var trans in selectedTransforms) { Text text trans.GetComponentText(); string textContent ; if (text null) { TextMeshProUGUI textMeshPro trans.GetComponentTextMeshProUGUI(); if (textMeshPro ! null) { textContent textMeshPro.text; } } else { textContent text.text; } if (!string.IsNullOrEmpty(textContent)!trans.name.Contains(LiberationSans SDF Atlas)) { UILanguageText uILanguageText trans.gameObject.AddComponentUILanguageText(); index index 1; string content ; if (textContent.Contains(\n)) { string[] temp textContent.Split(\n); for (int i 0; i temp.Length; i) { if (i temp.Length -1) { content content temp[i] \\n; } else { content content temp[i]; } } } else { content textContent; } string languageKey string.Format({0}{1}{2}, trans.name, labelStr, index); uILanguageText.languageKey languageKey; txtArray.Add(string.Format({0},{1}, languageKey, content)); Debug.Log(trans.name::: textContent); } } WriteFile(); Debug.Log(ÌáÈ¡½áÊø); } static void WriteFile() { File.WriteAllLines(Application.dataPath /Resources/Language/CN.txt, txtArray); } static void ReadFile() { txtArray.Clear(); string[] strs File.ReadAllLines(Application.dataPath /Resources/Language/CN.txt); for (int i 0; i strs.Length; i) { txtArray.Add(strs[i]); } }}
http://www.hkea.cn/news/14419336/

相关文章:

  • 网站必须兼容哪些浏览器北京建筑公司
  • 网站作弊芜湖做网站公司
  • 17. 整个网站建设中的关键是微商城网站建设资讯
  • 小程序招商深圳市seo上词多少钱
  • wordpress网站框架网站视频下载windows
  • 滁州市琅琊区规划建设局网站sem是什么的缩写
  • 如何将网站提交到搜索引擎网站运营与管理的对策
  • zhihe网站建设 淘宝当今做哪些网站能致富
  • 网站改版的费用建设银行官方网站电子银行登录
  • 个人做网站需要什么条件目前比较火的外贸产品
  • 那些空号检测网站是怎么做的郴州网页
  • 简要概括自建网站的优缺点莱芜都市网招聘
  • 门户网站建设不断双流县规划建设局网站
  • 怎么查一个网站是谁做的动漫设计专业怎么样
  • 网站建设的完整流程电商平台运营方案思路
  • 做一个网站放网上要多少钱郑州软件外包公司
  • 淘宝放单网站怎么做四川省建设安全管理协会网站
  • 爱站网工具石家庄网站建设seo公司哪家好
  • 温州网站建设平台做网站流量怎么卖
  • 微信的微网站是什么潍坊手机网站
  • 建网站价格网集团微网站建设
  • 中国网站用Cn域名怎样做网页推广
  • pc网站开发制作wordpress怎么弄主题
  • wordpress 国内视频网站百度速页建站
  • 马鞍山 做网站做网站开什么端口
  • 天津网站制作的公司卢氏县住房和城乡规划建设局网站
  • 绍兴网站建站模板湖南省郴州市宜章县邮政编码
  • 万网网站设计怎么能够找到免费的网址
  • 石家庄网站seo顾问吴忠网站设计公司
  • 腾讯云服务器如何建设网站济南哪有做网站的