private void SaveJson() { string jsonData = LitJson.JsonMapper.ToJson(MSystemSortJson); EDTool.WriteText(jsonData, Application.dataPath + JsonPath); AssetDatabase.Refresh(); }
private void SaveDecTreeJson() { string jsonData = LitJson.JsonMapper.ToJson(MDecTrees); EDTool.WriteText(jsonData, Application.dataPath + DecPath); AssetDatabase.Refresh(); }
private static void OpenWindow() { if (EDTool.CheckFileInPath(Application.dataPath + DecPath)) { string dataJson = EDTool.ReadText(Application.dataPath + DecPath); MDecTrees = LitJson.JsonMapper.ToObject <DecTrees>(dataJson); } else { MDecTrees = new DecTrees(); } if (EDTool.CheckFileInPath(Application.dataPath + BevPath)) { string dataJson = EDTool.ReadText(Application.dataPath + BevPath); MBevTrees = LitJson.JsonMapper.ToObject <BevTrees>(dataJson); } else { MBevTrees = new BevTrees(); } InitJson(); NodeEditorWindow window = GetWindow <NodeEditorWindow>(); window.titleContent = new GUIContent("决策及行为树编辑"); if (EditorApplication.isPlaying == true) { Timer = Time.realtimeSinceStartup; } }
//保存实体Json数据 private void SaveEntityJsonList() { if (MEntityJsonList.List.Count == 0) { return; } string jsonData = LitJson.JsonMapper.ToJson(MEntityJsonList); EDTool.WriteText(jsonData, Application.dataPath + EntityJsonPath); AssetDatabase.Refresh(); }
static void OpenWindow() { if (EDTool.CheckFileInPath(Application.dataPath + JsonPath)) { string dataJson = EDTool.ReadText(Application.dataPath + JsonPath); MSystemSortJson = LitJson.JsonMapper.ToObject <SystemSortJson>(dataJson); } var window = GetWindow <SystemSortEditorWindow>(); window.titleContent = new GUIContent("系统排序"); window.Show(); }
public static void OpenWindow() { EntityConfigEditorWindow window = GetWindow <EntityConfigEditorWindow>("实体编辑器"); window.minSize = new Vector2(800, 600); if (EDTool.CheckFileInPath(Application.dataPath + EntityJsonPath)) { string dataJson = EDTool.ReadText(Application.dataPath + EntityJsonPath); MEntityJsonList = LitJson.JsonMapper.ToObject <EntityJsonList>(dataJson); } }
private static void ShowWindow() { var window = GetWindow <LogicLayerEditorWindow>(); window.titleContent = new GUIContent("请求权重设置"); window.Show(); if (EDTool.CheckFileInPath(Application.dataPath + JsonPath)) { string dataJson = EDTool.ReadText(Application.dataPath + JsonPath); MReqWeightJson = LitJson.JsonMapper.ToObject <ReqWeightJson>(dataJson); ClearJson(); } }
private static void OpenWindow() { SelGo = null; SelAnim = null; SelClip = null; RunningClip.Clear(); SkillEditorWindow window = GetWindow <SkillEditorWindow>("技能编辑器"); window.minSize = new Vector2(1250, 800); if (EDTool.CheckFileInPath(Application.dataPath + JsonPath)) { string dataJson = EDTool.ReadText(Application.dataPath + JsonPath); Json = LitJson.JsonMapper.ToObject <SkillList>(dataJson); } }