Ejemplo n.º 1
0
    public static void PackAB_PC()
    {
        //修改assetbundles生成路径
        var buildString = GetBuildString();

        if (buildString != null)
        {
            buildParameter = new BuildParameter();
            buildParameter.SetExtraArg(buildString);
        }

        //判断是不是PC平台
        if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows ||
            EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64 ||
            EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneOSX ||
            EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneLinux64)
        {
            PackAB(BuildTarget.StandaloneWindows64);
        }
        else
        {
            curState = AutoPackerState.Pack_AB;
            EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone,
                                                            BuildTarget.StandaloneWindows64);
        }
    }
Ejemplo n.º 2
0
    public static void BuildIOS()
    {
        //修改导出路径
        string[] args = System.Environment.GetCommandLineArgs();
        if (args != null && args.Length >= 6)
        {
            ExportPath = args[5];
        }
        if (args != null && args.Length >= 7)
        {
            ExportName = args[6];
        }

        var buildString = GetBuildString();

        if (buildString != null)
        {
            buildParameter = new BuildParameter();
            buildParameter.SetExtraArg(buildString);
        }

        //判断是不是iOS平台
        if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS)
        {
            BuildApp(BuildTarget.iOS);
        }
        else
        {
            curState = AutoPackerState.Build_App;
            EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS);
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 设置打包参数
    /// </summary>
    public static void SetBuildParam()
    {
        var buildString = GetBuildString();

        if (buildString != null)
        {
            buildParameter.SetExtraArg(buildString);
        }
    }
Ejemplo n.º 4
0
    public static void PackAB_IOS()
    {
        //修改assetbundles生成路径
        var buildString = GetBuildString();

        if (buildString != null)
        {
            buildParameter = new BuildParameter();
            buildParameter.SetExtraArg(buildString);
        }

        //判断是不是iOS平台
        if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS)
        {
            PackAB(BuildTarget.iOS);
        }
        else
        {
            curState = AutoPackerState.Pack_AB;
            EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS);
        }
    }