Example #1
0
        /** ビルド。WebGL。
         */
        private static void Build_WebGL()
        {
            string t_log = "-------Build_WebGL-------\n";

            CommandLineParam t_commandline_param = GetCommandLine();

            System.Collections.Generic.List <string> t_scenepath_list = GetScenePathList();
            string[] t_levels = t_scenepath_list.ToArray();
            for (int ii = 0; ii < t_levels.Length; ii++)
            {
                t_log += t_levels[ii] + "\n";
            }

            string t_output_target = t_commandline_param.outputpath + "/WebGL";

            t_log += t_output_target + "\n";

            {
                UnityEditor.Build.Reporting.BuildReport t_return = UnityEditor.BuildPipeline.BuildPlayer(
                    t_levels,
                    t_output_target,
                    UnityEditor.BuildTarget.WebGL,
                    UnityEditor.BuildOptions.None
                    );

                t_log += t_return.summary.totalErrors.ToString();
                t_log += "-----------------------------------";
            }

            Tool.EditorLog(t_log);
        }
Example #2
0
        public static (string, string, double, SummaryType) Parse(string[] args)
        {
            string      inputFile      = FuzzySetParser.DefaultPath;
            string      outputFile     = SummaryResultWriter.DefaultPath;
            double      T1_THRESHOLD   = 0.1;
            SummaryType typeToGenerate = SummaryType.First;

            CommandLineParam currentOption = CommandLineParam.None;

            foreach (string param in args)
            {
                switch (param)
                {
                case "-i":
                    currentOption = CommandLineParam.InputFile;
                    break;

                case "-o":
                    currentOption = CommandLineParam.OutputFile;
                    break;

                case "-t":
                    currentOption = CommandLineParam.SummaryType;
                    break;

                case "-d":
                    currentOption = CommandLineParam.Threshold;
                    break;

                default:
                    switch (currentOption)
                    {
                    case CommandLineParam.InputFile:
                        inputFile = param;
                        break;

                    case CommandLineParam.OutputFile:
                        outputFile = param;
                        break;

                    case CommandLineParam.SummaryType:
                        typeToGenerate = param.StartsWith("f") ? SummaryType.First : SummaryType.Second;
                        break;

                    case CommandLineParam.Threshold:
                        T1_THRESHOLD = Double.Parse(param, CultureInfo.InvariantCulture);
                        break;
                    }
                    currentOption = CommandLineParam.None;
                    break;
                }
            }

            return(inputFile, outputFile, T1_THRESHOLD, typeToGenerate);
        }
Example #3
0
        /** コマンドライン。取得。
         */
        private static CommandLineParam GetCommandLine()
        {
            string[] t_commandline = System.Environment.GetCommandLineArgs();

            CommandLineParam t_param = new CommandLineParam();

            for (int ii = 0; ii < (t_commandline.Length - 1); ii++)
            {
                if (t_commandline[ii] == "---outputpath")
                {
                    t_param.outputpath = t_commandline[ii + 1];
                }
            }

            return(t_param);
        }
Example #4
0
        /** ビルド。StandaloneWindows。
         */
        private static void Build_StandAloneWindows()
        {
            string t_log = "-------Build_StandAloneWindows-------\n";

            CommandLineParam t_commandline_param = GetCommandLine();

            System.Collections.Generic.List <string> t_scenepath_list = GetScenePathList();
            string[] t_levels = t_scenepath_list.ToArray();
            for (int ii = 0; ii < t_levels.Length; ii++)
            {
                t_log += t_levels[ii] + "\n";
            }

            string t_output_target = t_commandline_param.outputpath + "/Exe/fee.exe";

            t_log += t_output_target + "\n";

                        #if (UNITY_5)
            {
                //未対応。
                UnityEngine.Debug.Assert(false);
            }
                        #else
            {
                UnityEditor.Build.Reporting.BuildReport t_return = UnityEditor.BuildPipeline.BuildPlayer(
                    t_levels,
                    t_output_target,
                    UnityEditor.BuildTarget.StandaloneWindows,
                    UnityEditor.BuildOptions.None
                    );

                t_log += t_return.summary.totalErrors.ToString();
                t_log += "-----------------------------------";
            }
                        #endif

            UnityEngine.Debug.Log(t_log);
        }
 public void Default_IsNull()
 {
     var value = new CommandLineParam();
     Assert.IsNull(value.Name);
 }
 public void Null_GetHashCode_ReturnsFalse()
 {
     object value1 = new CommandLineParam();
     Assert.AreEqual(0, value1.GetHashCode());
 }
Example #7
0
 private static CommandLine Test(string commandLineValue, CommandLineParam param)
 {
     var commandLine = new CommandLine {[param] = Value.From(commandLineValue)};
     Assert.AreEqual(commandLineValue, commandLine[param].Get());
     return commandLine;
 }