private void CreateFile(string outPath, string content) { outPath = GameFramework.Utility.Path.GetRegularPath(outPath); ToolsHelper.SaveFile(outPath, content, false); AssetDatabase.Refresh(); }
private void CreateItemView(string modName, string itemName, CompCollector collector) { string outPath = Path.GetFullPath($"Assets/Scripts/Hotfix/Module/{modName}/Item/View/{itemName}View.cs"); outPath = GameFramework.Utility.Path.GetRegularPath(outPath); ToolsHelper.SaveFile(outPath, getItemViewCodeStr(modName, itemName, collector)); AssetDatabase.Refresh(); }
private void CreateItem(string modName, string itemName) { string outPath = Path.GetFullPath($"Assets/Scripts/Hotfix/Module/{modName}/Item/{itemName}.cs"); outPath = GameFramework.Utility.Path.GetRegularPath(outPath); ToolsHelper.SaveFile(outPath, getItemCodeStr(modName, itemName), false); AssetDatabase.Refresh(); }
private void CreateData(string entityName) { string outPath = Path.GetFullPath($"{path_entity}/Entity/{entityName}/EntityData_{entityName}.cs"); outPath = GameFramework.Utility.Path.GetRegularPath(outPath); ToolsHelper.SaveFile(outPath, getDataCodeStr(entityName), false); AssetDatabase.Refresh(); }
private void CreateLogicView(string entityName, CompCollector collector) { string outPath = Path.GetFullPath($"{path_entity}/Entity/{entityName}/EntityView_{entityName}.cs"); outPath = GameFramework.Utility.Path.GetRegularPath(outPath); ToolsHelper.SaveFile(outPath, getViewCodeStr(entityName, collector)); AssetDatabase.Refresh(); }
public static void OpenLastScene() { var lastScene = EditorPrefs.GetString(LastScenePrefKey); if (!string.IsNullOrEmpty(lastScene)) { ToolsHelper.OpenScene(lastScene); } else { Debug.LogError("Not found last scene!"); } }
private void OutPut() { ToolsHelper.ClearConsole(); completedNum = 0; List <string[]> selFileList = new List <string[]>(); for (var index = 0; index < nameList.Count; index++) { selFileList.Add(new[] { nameList[index], $"{ExcelPath}/{nameList[index]}" }); } ProgressWindow(selFileList); }
private void CreatOneItem(int index) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField($" ", GUILayout.Width(5)); EditorGUILayout.LabelField($" {index + 1}.{nameList[index]}", GUILayout.Width(360)); if (GUILayout.Button("...", GUILayout.Width(25))) { ToolsHelper.ExecuteCommand($"start {ExcelPath}/{nameList[index]}"); } } EditorGUILayout.EndHorizontal(); }
public static void OpenMainScene() { var currentScene = EditorSceneManager.GetActiveScene().path; var mainScene = "Assets/Main.unity"; if (mainScene != currentScene) { EditorPrefs.SetString(LastScenePrefKey, currentScene); } ToolsHelper.OpenScene(mainScene); if (!EditorApplication.isPlaying) { EditorApplication.isPlaying = true; } }