少年修仙传客户端基础资源
client_Wu Xijin
2019-04-17 f6a774b04d77296279bbbf25603cbfed4170eacc
Assets/Editor/Tool/EffectAssetCheck.cs
@@ -287,6 +287,7 @@
    static List<NewBieGuideScriptableObject> newbieGuides = new List<NewBieGuideScriptableObject>();
    static List<SoSkill> soSkills = new List<SoSkill>();
    static List<AnalyzeTask> tasks = new List<AnalyzeTask>();
    static string ignorekeys = string.Empty;
    [MenuItem("程序/Effect Assets/移除无用的EffectKey")]
    public static void Remove()
@@ -318,6 +319,7 @@
        uieffects = GetEffectComponents();
        soSkills = GetSoSkills();
        newbieGuides = GetNewbieGuides();
        ignorekeys = GetIngoreKeys();
        try
        {
@@ -348,6 +350,12 @@
                        continue;
                    }
                    if (IsIgnoreKey(info.key, ref ignorekeys))
                    {
                        Debug.LogFormat("找到一个不要删除的 effect key:{0}", info.key);
                        continue;
                    }
                    if (ContainBySoSkills(info.key, ref soSkills))
                    {
                        Debug.LogFormat("找到一个被soskill依赖的 effect key:{0}", info.key);
@@ -375,12 +383,6 @@
                    if (ContainByCSharpFile(info.key, ref csharpFileContents))
                    {
                        Debug.LogFormat("找到一个写在C#文件中的 effect key:{0}", info.key);
                        continue;
                    }
                    if (ContainByPrefab(info.key, ref uieffects))
                    {
                        Debug.LogFormat("找到一个被prefab依赖的 effect key:{0}", info.key);
                        continue;
                    }
@@ -585,10 +587,10 @@
        }
        var soskills = new List<SoSkill>();
        foreach ( var path in assetPaths)
        foreach (var path in assetPaths)
        {
            var soskill = AssetDatabase.LoadAssetAtPath<SoSkill>(path);
            if ( soskill!=null)
            if (soskill != null)
            {
                soskills.Add(soskill);
            }
@@ -619,6 +621,11 @@
        }
        return newbieguides;
    }
    static string GetIngoreKeys()
    {
        return File.ReadAllText(Application.dataPath + "/Editor/Config/DeleteEffectExcludeKey.txt");
    }
    static bool ContainByTables(string key, ref List<Column> columns)
@@ -715,6 +722,11 @@
        return false;
    }
    static bool IsIgnoreKey(string key, ref string ignores)
    {
        return Regex.IsMatch(ignores, key);
    }
    static void OnUpdate()
    {
        var done = true;