private void NewEditedSkills()
    {
        if (UnityEditor.EditorUtility.DisplayDialog("关键信息", "加载或创建英雄技能数据将覆盖正在编辑的数据,继续吗?(如果之前的数据没有保存到表格文件里,请利用剪贴板拷到表格文件!)", "我确定要继续", "不要继续,我还没保存呢"))
        {
            SaveEditedSkills(HomePath.GetAbsolutePath("../../../edit_skills_bak.txt"));

            ClientModule.LoadTableConfig();
            PredefinedSkill.Instance.ReBuild();
            GfxSkillSystem.Instance.Reset();
            GfxSkillSystem.Instance.ClearSkillInstancePool();
            SkillSystem.SkillConfigManager.Instance.Clear();

            GameObject actor  = GameObject.Find("Editor_ActorRecord");
            GameObject skills = GameObject.Find("Editor_SkillRecords");
            if (null != actor && null != skills)
            {
                ActorRecord  actorRecord  = actor.GetComponent <ActorRecord>();
                SkillRecords skillRecords = skills.GetComponent <SkillRecords>();
                if (null != actorRecord && null != skillRecords)
                {
                    int        skillCount = 0;
                    List <int> skillIds   = new List <int>();
                    if (actorRecord.skill0 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill0);
                    }
                    if (actorRecord.skill1 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill1);
                    }
                    if (actorRecord.skill2 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill2);
                    }
                    if (actorRecord.skill3 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill3);
                    }
                    if (actorRecord.skill4 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill4);
                    }
                    if (actorRecord.skill5 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill5);
                    }
                    if (actorRecord.skill6 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill6);
                    }
                    if (actorRecord.skill7 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill7);
                    }
                    if (actorRecord.skill8 > 0)
                    {
                        ++skillCount; skillIds.Add(actorRecord.skill8);
                    }

                    RebuildVisualSkillInfo(actorRecord.id);

                    skillRecords.records.Clear();
                    for (int i = 0; i < skillCount; ++i)
                    {
                        AddViewedSkill(skillIds[i], skillRecords.records);
                    }
                }
            }
        }

        UnityEditor.EditorUtility.DisplayDialog("提示", "技能数据加载/创建完毕", "ok");
    }
    private void LoadEditedSkills(int targetId)
    {
        PlayerPrefs.SetInt("TargetId", targetId);
        PlayerPrefs.Save();

        SaveEditedSkills(HomePath.GetAbsolutePath("../../../edit_skills_bak.txt"));
        CopyTableAndDslFiles();

        ClientModule.LoadTableConfig();
        PredefinedSkill.Instance.ReBuild();
        GfxSkillSystem.Instance.Reset();
        GfxSkillSystem.Instance.ClearSkillInstancePool();
        SkillSystem.SkillConfigManager.Instance.Clear();

        GameObject actor  = GameObject.Find("Editor_ActorRecord");
        GameObject skills = GameObject.Find("Editor_SkillRecords");

        if (null != actor && null != skills)
        {
            ActorRecord  actorRecord  = actor.GetComponent <ActorRecord>();
            SkillRecords skillRecords = skills.GetComponent <SkillRecords>();
            if (null != actorRecord && null != skillRecords)
            {
                List <int> args    = new List <int>();
                int        actorId = actorRecord.id;
                if (actorRecord.skill0 > 0)
                {
                    args.Add(actorRecord.skill0);
                }
                if (actorRecord.skill1 > 0)
                {
                    args.Add(actorRecord.skill1);
                }
                if (actorRecord.skill2 > 0)
                {
                    args.Add(actorRecord.skill2);
                }
                if (actorRecord.skill3 > 0)
                {
                    args.Add(actorRecord.skill3);
                }
                if (actorRecord.skill4 > 0)
                {
                    args.Add(actorRecord.skill4);
                }
                if (actorRecord.skill5 > 0)
                {
                    args.Add(actorRecord.skill5);
                }
                if (actorRecord.skill6 > 0)
                {
                    args.Add(actorRecord.skill6);
                }
                if (actorRecord.skill7 > 0)
                {
                    args.Add(actorRecord.skill7);
                }
                if (actorRecord.skill8 > 0)
                {
                    args.Add(actorRecord.skill8);
                }

                RebuildVisualSkillInfo(actorId);

                bool isValid = true;
                if (string.IsNullOrEmpty(actorRecord.avatar))
                {
                    Debug.LogErrorFormat("actor avatar is empty !!!");
                    isValid = false;
                }
                foreach (int skillId in args)
                {
                    CheckEditedSkill(skillId, skillRecords.records, ref isValid);
                }
                if (isValid)
                {
                    TableConfig.Actor actorInfo = TableConfig.ActorProvider.Instance.GetActor(actorId);
                    if (null == actorInfo)
                    {
                        actorInfo    = new TableConfig.Actor();
                        actorInfo.id = actorId;
                        TableConfig.ActorProvider.Instance.ActorMgr.GetData().Add(actorId, actorInfo);
                    }
                    actorRecord.CopyTo(actorInfo);

                    foreach (SkillRecords.SkillRecord record in skillRecords.records)
                    {
                        TableConfig.Skill skillInfo = TableConfig.SkillProvider.Instance.GetSkill(record.id);
                        if (null == skillInfo)
                        {
                            skillInfo    = new TableConfig.Skill();
                            skillInfo.id = record.id;
                            TableConfig.SkillProvider.Instance.SkillMgr.GetData().Add(record.id, skillInfo);
                        }
                        record.CopyTo(skillInfo);
                    }

                    if (args.Count > 1)
                    {
                        GfxStorySystem.Instance.SendMessage("reload", actorId, targetId, args);
                    }
                }
            }

            UnityEditor.EditorUtility.DisplayDialog("提示", "编辑英雄与技能加载完毕", "ok");
        }
    }
    private void LoadViewedSkills(object[] fargs)
    {
        if (null != fargs && fargs.Length == 2)
        {
            int actorId  = (int)fargs[0];
            int targetId = (int)fargs[1];

            PlayerPrefs.SetInt("ActorId", actorId);
            PlayerPrefs.SetInt("TargetId", targetId);
            PlayerPrefs.Save();

            if (UnityEditor.EditorUtility.DisplayDialog("关键信息", "从文件加载数据将同时覆盖正在编辑的数据,继续吗?(如果之前的数据没有保存到表格文件里,请利用剪贴板拷到表格文件!)", "我确定要继续", "不要继续,我还没保存呢"))
            {
                SaveEditedSkills(HomePath.GetAbsolutePath("../../../edit_skills_bak.txt"));
                CopyTableAndDslFiles();
                m_CameraController.OnLevelWasLoaded(null);
                ClientModule.LoadTableConfig();
                PredefinedSkill.Instance.ReBuild();
                GfxSkillSystem.Instance.Reset();
                GfxSkillSystem.Instance.ClearSkillInstancePool();
                SkillSystem.SkillConfigManager.Instance.Clear();

                GameObject actor  = GameObject.Find("Editor_ActorRecord");
                GameObject skills = GameObject.Find("Editor_SkillRecords");
                if (null != actor && null != skills)
                {
                    ActorRecord  actorRecord  = actor.GetComponent <ActorRecord>();
                    SkillRecords skillRecords = skills.GetComponent <SkillRecords>();
                    if (null != actorRecord && null != skillRecords)
                    {
                        TableConfig.Actor actorInfo = TableConfig.ActorProvider.Instance.GetActor(actorId);
                        if (null != actorInfo)
                        {
                            List <int> args = new List <int>();
                            if (actorInfo.skill0 > 0)
                            {
                                args.Add(actorInfo.skill0);
                            }
                            if (actorInfo.skill1 > 0)
                            {
                                args.Add(actorInfo.skill1);
                            }
                            if (actorInfo.skill2 > 0)
                            {
                                args.Add(actorInfo.skill2);
                            }
                            if (actorInfo.skill3 > 0)
                            {
                                args.Add(actorInfo.skill3);
                            }
                            if (actorInfo.skill4 > 0)
                            {
                                args.Add(actorInfo.skill4);
                            }
                            if (actorInfo.skill5 > 0)
                            {
                                args.Add(actorInfo.skill5);
                            }
                            if (actorInfo.skill6 > 0)
                            {
                                args.Add(actorInfo.skill6);
                            }
                            if (actorInfo.skill7 > 0)
                            {
                                args.Add(actorInfo.skill7);
                            }
                            if (actorInfo.skill8 > 0)
                            {
                                args.Add(actorInfo.skill8);
                            }

                            RebuildVisualSkillInfo(actorId);

                            actorRecord.CopyFrom(actorInfo);

                            skillRecords.records.Clear();
                            foreach (int skillId in args)
                            {
                                AddViewedSkill(skillId, skillRecords.records);
                            }

                            GfxStorySystem.Instance.SendMessage("reload", actorId, targetId, args);
                        }
                    }
                }

                UnityEditor.EditorUtility.DisplayDialog("提示", "从文件加载英雄与技能完毕", "ok");
            }
        }
    }