From 31c2cebbccba45a00a755981dd6d0cdd0a0459e9 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 14 八月 2018 17:28:38 +0800
Subject: [PATCH] Merge branch 'master' into leonard

---
 Assets/Editor/Tool/WindowImageCheck.cs |  130 +++++++++++++++++++++---------------------
 1 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/Assets/Editor/Tool/WindowImageCheck.cs b/Assets/Editor/Tool/WindowImageCheck.cs
index aa1d6d2..39cae1f 100644
--- a/Assets/Editor/Tool/WindowImageCheck.cs
+++ b/Assets/Editor/Tool/WindowImageCheck.cs
@@ -6,74 +6,74 @@
 using System.IO;
 using System;
 
-public class WindowImageCheck
-{
-    static string windowRootPath = Application.dataPath + "/ResourcesOut/UI/Window";
-    static string windowRootPath2 = Application.dataPath + "/ResourcesOut/UI/PriorityWindow";
-    static string prefabRootPath = Application.dataPath + "/ResourcesOut/UI/Prefab";
-
-    [MenuItem("绛栧垝宸ュ叿/鏌ユ壘鍜岀Щ闄ゆ棤鐢ㄧ殑Image")]
-    public static void CheckAndReplaceFontSwitch()
-    {
-        try
-        {
-            var allFiles = new List<FileInfo>();
-            allFiles.AddRange(new DirectoryInfo(windowRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly));
-            allFiles.AddRange(new DirectoryInfo(windowRootPath2).GetFiles("*.prefab", SearchOption.TopDirectoryOnly));
-            allFiles.AddRange(new DirectoryInfo(prefabRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly));
-
-            var count = allFiles.Count;
-            var index = 0;
-
-            foreach (var file in allFiles)
-            {
-                var assetPath = file.FullName.Replace("\\", "/").Replace(Application.dataPath, "Assets");
-                var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
-
-                var images = prefab.GetComponentsInChildren<Image>(true);
-                foreach (var image in images)
-                {
-                    if (image != null)
-                    {
-                        if (!image.enabled || image.color.a == 0f)
-                        {
-                            path = string.Empty;
-                            Debug.Log(GetComponentPath(image.transform, ref path));
-                            MonoBehaviour.DestroyImmediate(image, true);
-                        }
-                    }
-                }
-
-                index++;
-                EditorUtility.SetDirty(prefab);
-                EditorUtility.DisplayProgressBar("妫�娴嬪拰绉婚櫎Image", StringUtility.Contact("姝e湪妫�娴�:", prefab.name), (float)index / count);
-            }
-
-            AssetDatabase.SaveAssets();
-            AssetDatabase.Refresh();
-
-            EditorUtility.ClearProgressBar();
-        }
-        catch (Exception ex)
-        {
-            Debug.Log(ex);
-        }
-
+public class WindowImageCheck
+{
+    static string windowRootPath = Application.dataPath + "/ResourcesOut/UI/Window";
+    static string windowRootPath2 = Application.dataPath + "/ResourcesOut/UI/PriorityWindow";
+    static string prefabRootPath = Application.dataPath + "/ResourcesOut/UI/Prefab";
+
+    [MenuItem("绛栧垝宸ュ叿/鏌ユ壘鍜岀Щ闄ゆ棤鐢ㄧ殑Image")]
+    public static void CheckAndReplaceFontSwitch()
+    {
+        try
+        {
+            var allFiles = new List<FileInfo>();
+            allFiles.AddRange(new DirectoryInfo(windowRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly));
+            allFiles.AddRange(new DirectoryInfo(windowRootPath2).GetFiles("*.prefab", SearchOption.TopDirectoryOnly));
+            allFiles.AddRange(new DirectoryInfo(prefabRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly));
+
+            var count = allFiles.Count;
+            var index = 0;
+
+            foreach (var file in allFiles)
+            {
+                var assetPath = file.FullName.Replace("\\", "/").Replace(Application.dataPath, "Assets");
+                var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
+
+                var images = prefab.GetComponentsInChildren<Image>(true);
+                foreach (var image in images)
+                {
+                    if (image != null)
+                    {
+                        if (!image.enabled || image.color.a == 0f)
+                        {
+                            path = string.Empty;
+                            Debug.Log(GetComponentPath(image.transform, ref path));
+                            MonoBehaviour.DestroyImmediate(image, true);
+                        }
+                    }
+                }
+
+                index++;
+                EditorUtility.SetDirty(prefab);
+                EditorUtility.DisplayProgressBar("妫�娴嬪拰绉婚櫎Image", StringUtility.Contact("姝e湪妫�娴�:", prefab.name), (float)index / count);
+            }
+
+            AssetDatabase.SaveAssets();
+            AssetDatabase.Refresh();
+
+            EditorUtility.ClearProgressBar();
+        }
+        catch (Exception ex)
+        {
+            Debug.Log(ex);
+        }
+
     }
 
     static string path;
-    private static string GetComponentPath(Transform _transform, ref string _path)
-    {
-        path = _transform.gameObject.name + path;
-        if (_transform.parent != null)
-        {
-            path = "/" + path;
-            return GetComponentPath(_transform.parent, ref _path);
-        }
-        else
-        {
-            return path;
-        }
+    private static string GetComponentPath(Transform _transform, ref string _path)
+    {
+        path = _transform.gameObject.name + path;
+        if (_transform.parent != null)
+        {
+            path = "/" + path;
+            return GetComponentPath(_transform.parent, ref _path);
+        }
+        else
+        {
+            return path;
+        }
     }
 
 }

--
Gitblit v1.8.0