private void RefreshStepData(GuideSubData d)
 {
     if (string.IsNullOrEmpty(d.path))
     {
         curTargetObj = null;
     }
     else
     {
         curTargetObj = GameObject.Find(d.path);
     }
 }
        public void InsertData(int ind = -1)
        {
            if (subData == null)
            {
                subData = new List <GuideSubData>();
            }
            GuideSubData d = new GuideSubData();

            if (ind < 0)
            {
                subData.Add(d);
            }
            else
            {
                subData.Insert(ind, d);
            }
            SortSubList();
        }
 private void ShowOneStep(GuideSubData d)
 {
     GUILayout.BeginHorizontal();
     GUILayout.Label(d.id + "", GUILayout.Width(50));
     GUILayout.Label(d.desc, GUILayout.Width(150));
     if (GUILayout.Button("编辑", GUILayout.Width(80)))
     {
         curStepIndex = d.id;
         RefreshStepData(d);
         return;
     }
     if (GUILayout.Button("删除", GUILayout.Width(80)))
     {
         curGuideData.DelData(d.id);
         return;
     }
     GUILayout.EndHorizontal();
     if (curStepIndex == d.id)
     {
         ShowStepEdit(d);
     }
 }
        /// <summary>
        /// 显示单个步骤编辑
        /// </summary>
        /// <param name="d"></param>
        private void ShowStepEdit(GuideSubData d)
        {
            GUILayout.BeginHorizontal();
            GUILayout.Label("备注:", GUILayout.Width(120));
            d.desc = EditorGUILayout.TextField(d.desc, GUILayout.Width(200));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("目标按钮:", GUILayout.Width(120));
            curTargetObj = (GameObject)EditorGUILayout.ObjectField(curTargetObj, typeof(GameObject), GUILayout.Width(200));
            GUILayout.EndHorizontal();
            if (curTargetObj != null && curTargetObj != oldTargetObj)
            {
                d.path       = GetObjPath(curTargetObj);
                oldTargetObj = curTargetObj;
            }

            GUILayout.BeginHorizontal();
            GUILayout.Label("相对路径:", GUILayout.Width(120));
            GUILayout.TextArea(d.path, GUILayout.Width(300), GUILayout.Height(50));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("按钮类型:", GUILayout.Width(120));
            d.btnType = EditorGUILayout.Popup(d.btnType, speTagStrs, GUILayout.Width(100));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("箭头方向:", GUILayout.Width(120));
            d.direction = EditorGUILayout.Popup(d.direction, dirStrs, GUILayout.Width(100));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("对话内容:", GUILayout.Width(120));
            d.content = EditorGUILayout.TextField(d.content, GUILayout.Width(300), GUILayout.Height(50));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("x偏移:", GUILayout.Width(120));
            d.offsetX = EditorGUILayout.IntField(d.offsetX, GUILayout.Width(100));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("y偏移:", GUILayout.Width(120));
            d.offsetY = EditorGUILayout.IntField(d.offsetY, GUILayout.Width(100));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("触发功能:", GUILayout.Width(120));
            d.systemOpenFuncName = EditorGUILayout.TextField(d.systemOpenFuncName, GUILayout.Width(300));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("语音:", GUILayout.Width(120));
            d.dialogMusic = EditorGUILayout.TextField(d.dialogMusic, GUILayout.Width(300));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("延迟触发显示:", GUILayout.Width(120));
            d.delayShowTime = float.Parse(EditorGUILayout.TextField(d.delayShowTime.ToString(), GUILayout.Width(300)));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("触发等级上限:", GUILayout.Width(120));
            d.triggerMaxPlayerLevel = int.Parse(EditorGUILayout.TextField(d.triggerMaxPlayerLevel.ToString(), GUILayout.Width(300)));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("关键帧:", GUILayout.Width(120));
            d.isKeyFrame = EditorGUILayout.Toggle(d.isKeyFrame, GUILayout.Width(80));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("是否触发主线任务:", GUILayout.Width(120));
            d.isTriggerMainTask = EditorGUILayout.Toggle(d.isTriggerMainTask, GUILayout.Width(80));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("副本内的时候是否可以执行触发引导:", GUILayout.Width(120));
            d.inDupCanTrigger = EditorGUILayout.Toggle(d.inDupCanTrigger, GUILayout.Width(80));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("vip就不触发?:", GUILayout.Width(120));
            d.vipNotTrigger = EditorGUILayout.Toggle(d.vipNotTrigger, GUILayout.Width(80));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("出来就显示黑背景?:", GUILayout.Width(120));
            d.isNeedBlack = EditorGUILayout.Toggle(d.isNeedBlack, GUILayout.Width(80));
            GUILayout.EndHorizontal();
        }