//ShowNotification(new GUIContent("没有配置输出路径"));

    public override void Draw()
    {
        DrawTitle("ab局内动作一致性");
        EditorGUILayout.BeginHorizontal();
        PathTag(idList[0], ref serBean.cdnSource);
        if (GUILayout.Button("修改SourceFile", GUILayout.Width(100)))
        {
            string folderPath = EditorUtility.OpenFolderPanel("选择文件夹", "", "");
            if (folderPath != string.Empty)
            {
                serBean.cdnSource = folderPath;
            }
        }
        EditorGUILayout.LabelField(serBean.cdnSource);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        PathTag(idList[1], ref serBean.art);
        if (GUILayout.Button("修改art目录", GUILayout.Width(100)))
        {
            string folderPath = EditorUtility.OpenFolderPanel("选择文件夹", "", "");
            if (folderPath != string.Empty)
            {
                serBean.art = folderPath;
            }
        }
        EditorGUILayout.LabelField(serBean.art);
        EditorGUILayout.EndHorizontal();
        if (GUILayout.Button("输出", GUILayout.Width(100)))
        {
            ResourceMoveHelper.StartProcess(new UIAB_DanceProcess(serBean.cdnSource, serBean.art));
        }
    }
Example #2
0
 public void CopyFrom(string src, string file)
 {
     for (int i = 0; i < bean.desc.Count; i++)
     {
         if (!bean.desc[i].enable)
         {
             continue;
         }
         string to        = bean.desc[i].path;
         string desc_file = file.Replace(src, to);//有不同输出路径.
         ResourceMoveHelper.CopyFile(file, desc_file);
         //if (File.Exists(desc_file))
         //{
         //    System.IO.File.SetAttributes(desc_file, System.IO.FileAttributes.Normal);
         //    System.IO.File.Delete(desc_file);
         //}
         //string dir = Path.GetDirectoryName(desc_file);
         //if (!Directory.Exists(dir))
         //{
         //    Directory.CreateDirectory(dir);
         //}
         //System.IO.File.Copy(file, desc_file);
     }
     //Debug.Log("invs:" + inv[j] + "     j:" + j + "  desc_file:" + desc_file);
 }
 protected void Repaint()
 {
     if (ResourceMoveHelper.ReFreshUI != null)
     {
         ResourceMoveHelper.ReFreshUI();
     }
 }
Example #4
0
    public bool OnFinish()
    {
        //List<string> android_unuse;
        //List<string> ios_unuse;
        //List<string> android_need_add;
        //List<string> ios_need_add;
        List <string> android_un = new List <string>();

        for (int i = 0; i < android_unuse.Count; i++)
        {
            for (int j = 0; j < android_unuse[i].pathList.Count; j++)
            {
                android_un.Add(android_unuse[i].pathList[j]);
            }
        }
        ResourceMoveHelper.WriteOnly(GetMyType() + "/安卓ab删除", android_un);

        List <string> ios_un = new List <string>();

        for (int i = 0; i < ios_unuse.Count; i++)
        {
            for (int j = 0; j < ios_unuse[i].pathList.Count; j++)
            {
                ios_un.Add(ios_unuse[i].pathList[j]);
            }
        }
        ResourceMoveHelper.WriteOnly(GetMyType() + "/ios_ab删除", ios_un);
        ResourceMoveHelper.WriteOnly(GetMyType() + "/安卓ab需添加", android_need_add);
        ResourceMoveHelper.WriteOnly(GetMyType() + "/ios_ab需添加", ios_need_add);


        //List<string> xlsList = new List<string>();
        //string[] allLine = File.ReadAllLines(m_xlsPath);
        //for (int i = 0; i < allLine.Length; i++)
        //{
        //    xlsList.Add(allLine[i].ToLower());
        //}

        //List<string> xls_add = dance_xml_actions.FindAll(x => !xlsList.Contains(x));
        //List<string> xml_add = xlsList.FindAll(x => !dance_xml_actions.Contains(x));
        //ResourceUsageCheck.WriteOnly(GetMyType() + "/xls需要补充", xls_add, WriteType.TEXT);
        //ResourceUsageCheck.WriteOnly(GetMyType() + "/xml需要补充", xml_add, WriteType.TEXT);



        List <string> actionmap_add = danceIds.FindAll(x => !actionmapIds.Contains(x));
        List <string> dance_xml_add = actionmapIds.FindAll(x => !danceIds.Contains(x));

        ResourceMoveHelper.WriteOnly(GetMyType() + "/actionmap有,dancexml没有", dance_xml_add, WriteType.TEXT);
        ResourceMoveHelper.WriteOnly(GetMyType() + "/dancexml有,actionmap没有", actionmap_add, WriteType.TEXT);
        return(true);
    }