コード例 #1
0
        private static void MenuItem_CreateMainScript()
        {
            Fee.File.Path t_path = new Fee.File.Path("Main.cs");

            //存在チェック。
            if (AssetTool.IsExistFile(t_path) == true)
            {
                return;
            }

            //スクリプトテンプレートを読み込み。
            string t_template_string = null;

            {
                Fee.File.Path t_fee_path = Fee_Tool.FindFeePath();
                if (t_fee_path != null)
                {
                    Fee.File.Path t_template_path = AssetTool.FindFile(t_fee_path, new File.Path("Fee_Main.temp.cs"));
                    if (t_template_path != null)
                    {
                        t_template_string = AssetTool.ReadTextFile(t_template_path);
                    }
                    else
                    {
                        Tool.EditorLogError("Not Found : Fee_Main.temp.cs");
                    }

                    if (t_template_string != null)
                    {
                        t_template_string = t_template_string.Replace("USE_DEF_FEE_TEMP", "true");
                    }
                    else
                    {
                        Tool.EditorLogError("Read Error : Fee_Main.temp.cs");
                    }
                }
                else
                {
                    Tool.EditorLogError("Not Found : fee_buildtarget");
                }
            }

            //スクリプトの書き込み。
            AssetTool.WriteTextFile(t_path, t_template_string);

            //更新。
            AssetTool.Refresh();
        }
コード例 #2
0
ファイル: Fee_Build.cs プロジェクト: bluebackblue/fee_core
        /** パッケージ。作成。
         */
        private static void BuildFeePackage()
        {
            //サブディレクトリの再帰探査。
            UnityEditor.ExportPackageOptions t_option = UnityEditor.ExportPackageOptions.Recurse;

            //非同期実行。
            t_option |= UnityEditor.ExportPackageOptions.Interactive;

            //ファイル名。
            string t_filename = "fee_" + System.DateTime.Now.ToString("yyyyMMdd_HH") + ".unitypackage";

            //ディレクトリ名。
            Fee.File.Path t_fee_path = Fee_Tool.FindFeePath();

            //出力。
            Fee.EditorTool.AssetTool.ExportPackage(t_fee_path, t_filename, t_option);
        }