public BuildReport BuildPackage(string[] scenes) { var p = P.GetActiveTargetParams(); var path = $"{p.outputDirectory}/{P.GetOutputPackageName( p )}"; try { B.development = p.development; B.compressionType = p.compression; B.il2CppCompilerConfiguration = p.il2CppCompilerConfiguration; B.WebGL_compressionFormat = p.WebGL_compressionFormat; B.WebGL_linkerTarget = p.WebGL_linkerTarget; B.WebGL_memorySize = p.WebGL_memorySize; B.WebGL_exceptionSupport = p.WebGL_exceptionSupport; #if UNITY_2019_1_OR_NEWER B.WebGL_threadsSupport = p.WebGL_threadsSupport; //B.WebGL_wasmStreaming = p.WebGL_wasmStreaming; #endif Log($"path: {path}"); Log($"buildTarget: {p.buildTarget.ToString()}"); Log($"options: {p.options.ToString()}"); return(BuildPipeline.BuildPlayer(scenes, path, BuildTarget.WebGL, p.options)); } catch (Exception e) { Debug.LogException(e); } return(null); }
public BuildReport BuildPackage(string[] scenes) { var p = P.GetActiveTargetParams(); var path = $"{p.outputDirectory}/{P.GetOutputPackageName( p )}"; //var scenes = BuildManagerCommand.GetBuildSceneName(); try { B.development = p.development; B.buildAppBundle = p.buildAppBundle; B.compressionType = p.compression; B.il2CppCompilerConfiguration = p.il2CppCompilerConfiguration; B.scriptingBackend = p.scriptingBackend; if (p.scriptingBackend == ScriptingImplementation.Mono2x) { B.targetArchitectures = AndroidArchitecture.ARMv7; } else { B.targetArchitectures = AndroidArchitecture.ARMv7 | AndroidArchitecture.ARM64; } // どちらのMinifyが利用されるかの調査、下記コードで"Release"がセットされると、後の工程で"Release"の文字列判定でReleaseが選択される模様 // // string value2 = (!Unsupported.IsSourceBuild()) ? ((!development) ? "Release" : "Development") : EditorUserBuildSettings.androidBuildType.ToString(); // // Unsupported.IsSourceBuild()はエディタ上ではFalseが返ってくる // 過去バージョンとの兼ね合いかわからないがTrueの場合はEditorUserBuildSettings.androidBuildTypeが利用されることになる // 2018.4.12f1時点ではEditorUserBuildSettings.androidBuildTypeは封印されているため、エディタ上からの入力は不可能 // なのでUnsupported.IsSourceBuild()がTrueでもいいようにEditorUserBuildSettings.androidBuildTypeを書き換える B.androidBuildType = p.development ? AndroidBuildType.Development : AndroidBuildType.Release; //Log( $"path: {path}" ); Log($"buildTarget: {p.buildTarget.ToString()}"); return(BuildPipeline.BuildPlayer(scenes, path, BuildTarget.Android, p.options)); } catch (System.Exception e) { Debug.LogException(e); } return(null); }
public BuildReport BuildPackage(string[] scenes) { var p = P.GetActiveTargetParams(); var path = $"{p.outputDirectory}/{P.GetOutputPackageName( p )}"; //var scenes = BuildManagerCommand.GetBuildSceneName(); try { B.development = p.development; //B.buildAppBundle = p.buildAppBundle; B.compressionType = p.compression; B.il2CppCompilerConfiguration = p.il2CppCompilerConfiguration; B.scriptingBackend = p.scriptingBackend; Log($"path: {path}"); Log($"buildTarget: {p.buildTarget.ToString()}"); return(BuildPipeline.BuildPlayer(scenes, path, p.buildTarget, p.options)); } catch (System.Exception e) { Debug.LogException(e); } return(null); }