コード例 #1
0
        private void CreateFile(string outPath, string content)
        {
            outPath = GameFramework.Utility.Path.GetRegularPath(outPath);

            ToolsHelper.SaveFile(outPath, content, false);
            AssetDatabase.Refresh();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #6
0
ファイル: FuseToolsMenu.cs プロジェクト: q425163005/GF
        public static void OpenLastScene()
        {
            var lastScene = EditorPrefs.GetString(LastScenePrefKey);

            if (!string.IsNullOrEmpty(lastScene))
            {
                ToolsHelper.OpenScene(lastScene);
            }
            else
            {
                Debug.LogError("Not found last scene!");
            }
        }
コード例 #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);
        }
コード例 #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();
 }
コード例 #9
0
ファイル: FuseToolsMenu.cs プロジェクト: q425163005/GF
        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;
            }
        }