Exemplo n.º 1
0
    // ビルド前処理
    public void OnPreprocessBuild(UnityEditor.BuildTarget target, string path)
    {
        if (target == BuildTarget.Android)
        {
            PlayerSettings.Android.keystoreName = "./everystudio_everystudio_everypass.keystore";
            PlayerSettings.Android.keystorePass = "******";

            PlayerSettings.Android.keyaliasName = "everystudio";
            PlayerSettings.Android.keyaliasPass = "******";

            BuildScript.apk_filename = "android.apk";
        }
        else if (target == BuildTarget.StandaloneWindows || target == BuildTarget.StandaloneWindows64)
        {
            EditDirectory.Delete(Application.dataPath + "/../" + Path.Combine(BuildScript.BUILD_PROJECT_DIRECTORY, BuildScript.GetPlatformFolderForAssetBundles(target)));
        }

        // 通常ビルド時にはマスターデータは作らない
        // 開発中にしてください(マスターだけ編集した場合にめんどっちいな)
        //Labyrinthgirls.MakeMasterData.Make();
        //AssetbundleCharaTexture.SelectionAsset();

        ConfigHolderEditor.SetupBuild();


        /*
         * // 引数取得
         * string[] args = System.Environment.GetCommandLineArgs();
         *
         * int i, len = args.Length;
         * for (i = 0; i < len; ++i)
         * {
         *      switch (args[i])
         *      {
         *              case "/branch":
         *              case "/debug_message":
         *                      break;
         *      case "target_env":
         *              asset.environment = args[i + 1];
         *              break;
         *              case "build_number":
         *                      PlayerSettings.iOS.buildNumber = args[i + 1];
         *                      break;
         *      }
         * }
         */
    }
Exemplo n.º 2
0
    // ビルド前処理
    public void OnPreprocessBuild(UnityEditor.BuildTarget target, string path)
    {
        if (target == BuildTarget.StandaloneWindows || target == BuildTarget.StandaloneWindows64)
        {
            EditDirectory.Delete(Application.dataPath + "/../" + Path.Combine(BuildScript.BUILD_PROJECT_DIRECTORY, BuildScript.GetPlatformFolderForAssetBundles(target)));
        }



        // 引数取得
        string[] args = System.Environment.GetCommandLineArgs();

        int i, len = args.Length;

        for (i = 0; i < len; ++i)
        {
            switch (args[i])
            {
            case "/branch":
            case "/debug_message":
                break;

            case "build_target":
                if (args[i + 1] == "ios")
                {
                    EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS);
                }
                break;

            case "target_env":
                if (args[i + 1] == "development")
                {
                    PlayerSettings.productName = string.Format("Dev{0}", PlayerSettings.productName);
                    PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, PlayerSettings.applicationIdentifier + ".development");
                }
                break;

            case "build_number":
                PlayerSettings.iOS.buildNumber = args[i + 1];
                break;
            }
        }
    }