private void OnGUI() { EditorGUILayout.BeginVertical(); EditorGUILayout.LabelField("输入技能id数字或id名称搜索"); id = EditorGUILayout.IntField("id数字:", id); idName = EditorGUILayout.TextField("id名称:", idName); if (GUILayout.Button("id数字搜索并应用", GUILayout.Height(40))) { if (id > 0 && EditorDataContainer.allSkillUnits.units.Count > id) { idName = EditorDataContainer.GetSkillStringById(id); DataConvert.ConvertSkillUnit(EditorDataContainer.currentskillAssetData.skillUnit, EditorDataContainer.allSkillUnits.units[id]); int curart = EditorDataContainer.currentskillAssetData.skillUnit.artId; SkillUnit.SkillArt oart = EditorDataContainer.allSkillUnits.arts[curart]; DataConvert.ConvertSkillArt(EditorDataContainer.currentskillAssetData.skillArt, oart); EditorDataContainer.UseSkillArt(oart); } } if (GUILayout.Button("id名字搜索并应用", GUILayout.Height(40))) { id = EditorDataContainer.GetSkillIdByString(idName); if (id > 0 && EditorDataContainer.allSkillUnits.units.Count > id) { DataConvert.ConvertSkillUnit(EditorDataContainer.currentskillAssetData.skillUnit, EditorDataContainer.allSkillUnits.units[id]); int curart = EditorDataContainer.currentskillAssetData.skillUnit.artId; SkillUnit.SkillArt oart = EditorDataContainer.allSkillUnits.arts[curart]; DataConvert.ConvertSkillArt(EditorDataContainer.currentskillAssetData.skillArt, oart); EditorDataContainer.UseSkillArt(oart); } } if (GUILayout.Button("Close", GUILayout.Height(40))) { Close(); } EditorGUILayout.EndVertical(); }