本文整理汇总了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);
}
}
示例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, "" );
}
}
示例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;
}
示例4: BaseBuilder
public BaseBuilder()
{
Name = "Base";
options = BuildOptions.None;
target = BuildTarget.Android;
DefineSymbols = "";
}
示例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;
}
示例6: PerformIOSReleaseBuild
public static void PerformIOSReleaseBuild()
{
_excelSuccessCallback = DoIOSReleaseBuild;
_buildOptions = BuildOptions.Il2CPP;
// Process the Excel Files
ProcessExcelFiles();
}
示例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);
}
示例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);
}
}
}
示例9: PerformIOSReleaseBuildAndRun
public static void PerformIOSReleaseBuildAndRun()
{
_excelSuccessCallback = DoIOSReleaseBuild;
_buildOptions = BuildOptions.Il2CPP | BuildOptions.AutoRunPlayer;
// Process the Excel Files
ProcessExcelFiles();
}
示例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 "";
}
示例11: PerformIOSDebugBuild
public static void PerformIOSDebugBuild()
{
_excelSuccessCallback = DoIOSDebugBuild;
_buildOptions = BuildOptions.Il2CPP | BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.SymlinkLibraries;
// Process the Excel Files
ProcessExcelFiles();
}
示例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);
}
}
示例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();
}
}
}
示例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);
}
}
示例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>();
}