admin管理员组

文章数量:1538079

项目上线难免有很多的版本,比如要上港台新马版本时就会涉及到将项目的中的文字转换为繁体中文。

制作一个一键转化工具,将文本预制体中的中文都转化为繁体中文岂美哉。

说干就干。

public class ChineseUtility: Editor
{
    [MenuItem("other/简繁装换")]
    public static void ChineseUtils()
    {
        string findPath = EditorUtility.OpenFolderPanel("Find Folder", "Resources", "");
        if (string.IsNullOrEmpty(findPath))
        {
            return;
        }
        StringBuilder builder = new StringBuilder();
        List<string> withoutExtensions = new List<string>() { ".prefab", ".txt" };
        builder.Append("修改:-----------------------\n");
        int count = 0;
        string[] files = Directory.GetFiles(findPath, "*.*", SearchOption.AllDirectories).Where(s => withoutExtensions.Contains(Path.GetExtensi

本文标签: 编辑器一键繁体简体工具