Ejemplo n.º 1
0
        private void CreateFile(string outPath, string content)
        {
            outPath = GameFramework.Utility.Path.GetRegularPath(outPath);

            ToolsHelper.SaveFile(outPath, content, false);
            AssetDatabase.Refresh();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
        public static void OpenLastScene()
        {
            var lastScene = EditorPrefs.GetString(LastScenePrefKey);

            if (!string.IsNullOrEmpty(lastScene))
            {
                ToolsHelper.OpenScene(lastScene);
            }
            else
            {
                Debug.LogError("Not found last scene!");
            }
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 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();
 }
Ejemplo n.º 9
0
        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;
            }
        }