Exemple #1
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            if (!enable)
            {
                return;
            }
            if (target == null)
            {
                return;
            }
            AutomaticBuildScript myScript = (AutomaticBuildScript)target;

            if (GUILayout.Button("Build All"))
            {
                myScript.Build(myScript.ForceReleaseBuild);
            }

            if (GUILayout.Button("Clean All"))
            {
                myScript.Clean();
            }

            if (GUILayout.Button("Deploy All"))
            {
                myScript.Deploy();
            }

            if (GUILayout.Button("Rebuild All"))
            {
                myScript.Clean();
                myScript.Build(myScript.ForceReleaseBuild);
                myScript.Deploy();
            }

            if (File.Exists("../../AwsomenautsDeploy/upload.bat") && GUILayout.Button("Upload All"))
            {
                myScript.Clean();
                myScript.Build(true);
                myScript.Deploy();

                enable = false;
                Process p = Process.Start("cmd.exe", "/C ..\\..\\AwsomenautsDeploy\\upload.bat");
                p.EnableRaisingEvents = true;
                p.Exited += (sender, args) => OnClose();
            }
        }
Exemple #2
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();


            if (target == null)
            {
                return;
            }
            BuildOpts myScript = (BuildOpts)target;

            if (GUILayout.Button("Build"))
            {
                AutomaticBuildScript.Build(myScript.ToBuildOptions(myScript.options));
            }

            if (GUILayout.Button("Clean"))
            {
                AutomaticBuildScript.Clean(myScript.ToBuildOptions(myScript.options));
            }

            if (GUILayout.Button("Deploy"))
            {
                AutomaticBuildScript.Deploy(myScript.ToBuildOptions(myScript.options));
            }

            if (GUILayout.Button("Rebuild"))
            {
                AutomaticBuildScript.Clean(myScript.ToBuildOptions(myScript.options));
                AutomaticBuildScript.Build(myScript.ToBuildOptions(myScript.options));
                AutomaticBuildScript.Deploy(myScript.ToBuildOptions(myScript.options));
            }
        }