当前位置: 首页>>代码示例>>C#>>正文


C# BuildOptions类代码示例

本文整理汇总了C#中BuildOptions的典型用法代码示例。如果您正苦于以下问题:C# BuildOptions类的具体用法?C# BuildOptions怎么用?C# BuildOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BuildOptions类属于命名空间,在下文中一共展示了BuildOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenericBuild

 static void GenericBuild(string[] scenes, string target_dir, BuildTarget build_target, BuildOptions build_options) {
     EditorUserBuildSettings.SwitchActiveBuildTarget(build_target);
     string res = BuildPipeline.BuildPlayer(scenes, target_dir, build_target, build_options);
     if (res.Length > 0) {
         throw new Exception("BuildPlayer failure: " + res);
     }
 }
开发者ID:HardnHeavy,项目名称:Routines,代码行数:7,代码来源:CIBuilder.cs

示例2: BuildGame

    public static void BuildGame(BuildTarget buildTarget, BuildOptions buildOptions = BuildOptions.None)
    {
        if (BuildPipeline.isBuildingPlayer == false) {
            UnityEngine.Debug.ClearDeveloperConsole();

            var smcsFile = Path.Combine( Application.dataPath, "smcs.rsp" );
            var gmcsFile = Path.Combine( Application.dataPath, "gmcs.rsp" );

            // -define:debug;poop
            File.WriteAllText( smcsFile, "-define:BUILD" );
            File.WriteAllText( gmcsFile, "-define:BUILD" );

            AssetDatabase.Refresh();

            string[] scenes = GetSceneList();
            //string path = Application.dataPath.Remove(Application.dataPath.Length - 8, 7) + "_build";

            // Build player.
            BuildPipeline.BuildPlayer(scenes, path + "/" + StringManager.BUILDNAME + ".exe", buildTarget, buildOptions);

            // Copy a file from the project folder to the build folder, alongside the built game. eg:
            // FileUtil.CopyFileOrDirectory("Assets/WebPlayerTemplates/Readme.txt", path + "Readme.txt");

            //remove build thingies
            File.WriteAllText( smcsFile, "" );
            File.WriteAllText( gmcsFile, "" );
        }
    }
开发者ID:chicostategamestudios,项目名称:qk-pop,代码行数:28,代码来源:ScriptBuild.cs

示例3: BuildConfiguration

 private BuildConfiguration()
 {
     this.scenes = new List<string>();
     this.dirMappings = new Dictionary<string, string>();
     this.fileMappings = new Dictionary<string, string>();
     this.options = BuildOptions.None;
 }
开发者ID:Elideb,项目名称:UnExt,代码行数:7,代码来源:BuildConfiguration.cs

示例4: BaseBuilder

 public BaseBuilder()
 {
     Name = "Base";
     options = BuildOptions.None;
     target = BuildTarget.Android;
     DefineSymbols = "";
 }
开发者ID:dudor,项目名称:unity3dbuildmanager,代码行数:7,代码来源:BuildManager.cs

示例5: BuildPlayer

        string BuildPlayer(BuildTarget target, BuildOptions options, params string[] levels)
        {
            var output = Path.Combine(OutputDir, target.ToString());
            DirectoryEx.DeleteDirectory(output);

            BuildPipeline.BuildPlayer(levels, output, target,  options);
            return output;
        }
开发者ID:learnUnity,项目名称:AssetBundlePatch,代码行数:8,代码来源:OneBuilderEditor.cs

示例6: PerformIOSReleaseBuild

    public static void PerformIOSReleaseBuild()
    {
        _excelSuccessCallback = DoIOSReleaseBuild;

        _buildOptions = BuildOptions.Il2CPP;

        // Process the Excel Files
        ProcessExcelFiles();
    }
开发者ID:Benzino,项目名称:ExcelToJsonConverter,代码行数:9,代码来源:BuildScript.cs

示例7: GetExtensionForBuildTarget

 public static string GetExtensionForBuildTarget(BuildTarget target, BuildOptions options)
 {
     IBuildPostprocessor buildPostProcessor = ModuleManager.GetBuildPostProcessor(target);
     if (buildPostProcessor == null)
     {
         return string.Empty;
     }
     return buildPostProcessor.GetExtension(target, options);
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:9,代码来源:PostprocessBuildPlayer.cs

示例8: ParseArgs

        private static void ParseArgs(ref BuildOptions opt, ref string outputpath)
        {
            string[] args = System.Environment.GetCommandLineArgs();

            string productPath = Path.Combine(Application.dataPath, KEngine.AppEngine.GetConfig("ProductRelPath"));

            if (!Directory.Exists(productPath))
            {
                Directory.CreateDirectory(productPath);
            }

            if (args.Length >= 2)
            {
                CommandArgs commandArg = CommandLine.Parse(args);
                //List<string> lparams = commandArg.Params;
                Dictionary<string, string> argPairs = commandArg.ArgPairs;

                foreach (KeyValuePair<string, string> item in argPairs)
                {
                    switch (item.Key)
                    {
                        case "BundleVersion":
                            PlayerSettings.bundleVersion = item.Value;
                            break;
                        case "AndroidVersionCode":
                            PlayerSettings.Android.bundleVersionCode = System.Int32.Parse(item.Value);
                            break;
                        case "AndroidKeyStoreName":
                            PlayerSettings.Android.keystoreName = item.Value;
                            break;
                        case "AndroidKeyStorePass":
                            PlayerSettings.Android.keystorePass = item.Value;
                            break;
                        case "AndroidkeyAliasName":
                            PlayerSettings.Android.keyaliasName = item.Value;
                            break;
                        case "AndroidKeyAliasPass":
                            PlayerSettings.Android.keyaliasPass = item.Value;
                            break;
                        case "BuildOptions":
                        {
                            opt = BuildOptions.None;
                            string[] opts = item.Value.Split('|');
                            foreach (string o in opts)
                            {
                                opt = opt | (BuildOptions) System.Enum.Parse(typeof (BuildOptions), o);
                            }
                        }
                            break;
                        case "Outputpath":
                            outputpath = item.Value;
                            break;
                    }
                    UnityEngine.Debug.Log(item.Key + " : " + item.Value);
                }
            }
        }
开发者ID:s3chugo,项目名称:KEngine,代码行数:57,代码来源:KAutoBuilder.cs

示例9: PerformIOSReleaseBuildAndRun

    public static void PerformIOSReleaseBuildAndRun()
    {
        _excelSuccessCallback = DoIOSReleaseBuild;

        _buildOptions = BuildOptions.Il2CPP | BuildOptions.AutoRunPlayer;

        // Process the Excel Files
        ProcessExcelFiles();
    }
开发者ID:Benzino,项目名称:ExcelToJsonConverter,代码行数:9,代码来源:BuildScript.cs

示例10: GetScriptLayoutFileFromBuild

 public static string GetScriptLayoutFileFromBuild(BuildOptions options, BuildTarget target, string installPath, string fileName)
 {
     IBuildPostprocessor buildPostProcessor = ModuleManager.GetBuildPostProcessor(target);
     if (buildPostProcessor != null)
     {
         return buildPostProcessor.GetScriptLayoutFileFromBuild(options, installPath, fileName);
     }
     return "";
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:9,代码来源:PostprocessBuildPlayer.cs

示例11: PerformIOSDebugBuild

    public static void PerformIOSDebugBuild()
    {
        _excelSuccessCallback = DoIOSDebugBuild;

        _buildOptions = BuildOptions.Il2CPP | BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.SymlinkLibraries;

        // Process the Excel Files
        ProcessExcelFiles();
    }
开发者ID:Benzino,项目名称:ExcelToJsonConverter,代码行数:9,代码来源:BuildScript.cs

示例12: GenericBuild

    static void GenericBuild(string[] scenes, string target_filename, BuildTarget build_target, BuildOptions build_options)
    {
        EditorUserBuildSettings.SwitchActiveBuildTarget(build_target);
        Debug.Log("-- 빌드 과정을 시작합니다...");
        string res = BuildPipeline.BuildPlayer(scenes, target_filename, build_target, build_options);
        if (res.Length > 0) {

            throw new Exception("빌드 실패: " + res);
        }
    }
开发者ID:hlees,项目名称:testandroid,代码行数:10,代码来源:BuildScript.cs

示例13: DrawGUI

    public void DrawGUI(uBuildWindow window)
    {
        EditorGUILayout.BeginHorizontal();
        IsFoldOut = EditorGUILayout.Foldout( IsFoldOut, BuildName + " (" + target.ToString() + ')');
        GUILayout.FlexibleSpace();
        if(Errors.Count > 0)
        {
            GUILayout.Label(window.errBtnContent);
        }
        if(GUILayout.Button(window.rmBtnContent))
        {
            window.RemoveBuildSetting(this);
        }
        EditorGUILayout.EndHorizontal();

        if(IsFoldOut)
        {
            isEnabled = EditorGUILayout.Toggle("Enabled?", isEnabled);
            GUI.enabled = isEnabled;
            BuildName = EditorGUILayout.TextField("BuildName: ", BuildName);

            BuildTarget newtarget = (BuildTarget)EditorGUILayout.EnumPopup("Target: ", target);
            if(newtarget != target)
            {
                Extension = Extension == DeterminateExtension(target) ? DeterminateExtension(newtarget) : Extension;
                target = newtarget;
            }
            options = (BuildOptions)EditorGUILayout.EnumMaskField("Options: ", options);

            HasCustomExtension = EditorGUILayout.ToggleLeft("Custom Extension?", HasCustomExtension);

            if(HasCustomExtension)
            {
                EditorGUILayout.BeginHorizontal();
                Extension = EditorGUILayout.TextField("Custom Extension: ", Extension ?? DeterminateExtension(target));
                EditorGUILayout.EndHorizontal();
            }
            GUI.enabled = true;

            if(Errors.Count > 0)
            {
                //EditorGUILayout.BeginScrollView(errorScroll, false, false);
                GUILayout.Space(10);
                EditorGUILayout.BeginHorizontal();
                for (int i = 0; i < Errors.Count;++i)
                {

                    Vector2 h = GUI.skin.button.CalcSize(new GUIContent(Errors[i]));
                    EditorGUILayout.SelectableLabel(Errors[i], GUILayout.Height(h.y), GUILayout.Width(h.x));
                }
                EditorGUILayout.EndHorizontal();
                //EditorGUILayout.EndScrollView();
            }
        }
    }
开发者ID:HatiEth,项目名称:uBuild,代码行数:55,代码来源:uBuildSetting.cs

示例14: GenericBuild

 static void GenericBuild(string[] scenes, string target_dir, BuildTarget build_target, BuildOptions build_options)
 {
     if(!Directory.Exists(TARGET_DIR)){
         Directory.CreateDirectory(TARGET_DIR);
     }
         EditorUserBuildSettings.SwitchActiveBuildTarget(build_target);
         string res = BuildPipeline.BuildPlayer(scenes,target_dir,build_target,build_options);
         if (res.Length > 0) {
                 throw new Exception("BuildPlayer failure: " + res);
         }
 }
开发者ID:charliehuge,项目名称:GGJ13,代码行数:11,代码来源:CIEditor.cs

示例15: BuildLogger

        internal BuildLogger(IApp app, Document doc, ScintillaControl sci, BuildOptions options)
        {
            this.app = app;
            this.doc = doc;
            this.sci = sci;
            this.options = options;

            app.CloseView("ErrorList");
            this.err = app.GetService<IErrorListService>();
            this.output = app.GetService<IOutputService>();
        }
开发者ID:rizwan3d,项目名称:elalang,代码行数:11,代码来源:BuildLogger.cs


注:本文中的BuildOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。