少年修仙传客户端基础资源
Assets/Editor/Tool/ChangePrefabsFont.cs
@@ -55,10 +55,10 @@
        filepaths1.CopyTo(filepaths, 0);
        filepaths2.CopyTo(filepaths, filepaths1.Length);
        Debug.LogFormat("预修改预制体字体总数:{0}", filepaths.Length);
        int startIndex = 0;
        int startIndex = 0; //文件执行个数
        int a = 0;
        int i = 0;
        int a = 0;  // 总字体数
        int i = 0;  // 更换字体数
        EditorApplication.update = delegate () {
            string file = filepaths[startIndex];
            file = file.Substring(file.IndexOf("Assets"));
@@ -75,6 +75,7 @@
                if (item.font == fromChangeFont)
                {
                    item.font = toChangeFont;
                    item.fontSize = item.fontSize - 2;
                    EditorUtility.SetDirty(_prefab);
                    i++;
                }
@@ -83,12 +84,12 @@
            startIndex++;
            
            if (isCancel || startIndex >= filepaths.Length) {
                Debug.LogFormat("字体批量修改成功--检索{0}个预制体, 字体总个数{1},修改{2}", startIndex, a, i);
                EditorUtility.ClearProgressBar();
                EditorApplication.update = null;
                startIndex = 0;
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
                Debug.LogFormat("字体批量修改成功--{0}", i);
            }
        };
    }