コード例 #1
0
ファイル: BuildScript.cs プロジェクト: cn00/unity_build_ipa
    static void ExportIOSProjSim()
    {
        AssetBundleBuildLocalStreamingAsset.Build();

        var version = new FGVersion(PlayerSettings.bundleVersion);

        //version.Minor += 1;
        PlayerSettings.bundleVersion  = version.ToString();
        PlayerSettings.iOS.sdkVersion = iOSSdkVersion.SimulatorSDK;
//        PlayerSettings.iOS.buildNumber = (int.Parse(PlayerSettings.iOS.buildNumber) + 1).ToString();
        var versionCode = int.Parse(PlayerSettings.iOS.buildNumber);

        string target_dir = "ios.sim.proj";
        var    option     = BuildOptions.EnableHeadlessMode | BuildOptions.SymlinkLibraries | BuildOptions.Il2CPP;

        version.Patch = 0;
        if (Environment.GetEnvironmentVariable("configuration") == "Release")
        {
            PlayerSettings.SetStackTraceLogType(LogType.Error, StackTraceLogType.None);
        }
        else
        {
            PlayerSettings.SetStackTraceLogType(LogType.Exception, StackTraceLogType.ScriptOnly);
            option |= BuildOptions.AllowDebugging;
        }
        GenericBuild(SCENES, target_dir, BuildTargetGroup.iOS, BuildTarget.iOS, option);
    }
コード例 #2
0
ファイル: BuildScript.cs プロジェクト: cn00/unity_build_ipa
    static void BuildAndroidApk()
    {
        AssetBundleBuildLocalStreamingAsset.Build();

        var version = new FGVersion(PlayerSettings.bundleVersion);

        // TODO: open this when release
        // version.Minor += 1;
        version.Patch = 0;
        PlayerSettings.bundleVersion              = version.ToString();
        PlayerSettings.Android.bundleVersionCode += 1;
        var versionCode = PlayerSettings.Android.bundleVersionCode;

        string target_dir = TARGET_DIR + APP_NAME + ".apk";

        GenericBuild(SCENES, target_dir, BuildTargetGroup.Android, BuildTarget.Android, BuildOptions.None);
    }