public static void BuildError(BuildReport report, BuildParameter parameter) { Debug.LogError("Build Error" + Environment.NewLine + JsonUtility.ToJson(parameter)); var error = String.Join(Environment.NewLine, report.steps.SelectMany(s => s.messages).Select(m => $"{m.type} {m.content}")); Debug.LogError(error); throw new InvalidOperationException("Build Error"); }
public void OnPreprocessBuild(BuildReport report) { var parameter = BuildParameter.GetActiveParameter(); Debug.Log($"Build {report.summary.platform} Start" + Environment.NewLine + JsonUtility.ToJson(parameter)); PlayerSettings.applicationIdentifier = parameter.BundleIdentifier; PlayerSettings.productName = parameter.AppName; var bi = ScriptableObject.CreateInstance <BuildInformation>(); bi.BuildDateBinary = DateTime.Now.ToBinary(); bi.BundleIdentifier = parameter.BundleIdentifier; bi.Environment = parameter.Environment; bi.Save(); SetAndroidParameters(); }
public static void Build() { //Clear Directory if (Directory.Exists(BuildDirectory)) { Directory.Delete(BuildDirectory, true); } AssetDatabase.CreateFolder("", BuildDirectory); var target = EditorUserBuildSettings.activeBuildTarget; var report = BuildPipeline.BuildPlayer(GetBuildScenes(), GetBuildPath(), target, BuildEvent.GetBuildOption(BuildParameter.GetActiveParameter())); if (report.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded) { return; } BuildEvent.BuildError(report, BuildParameter.GetActiveParameter()); }
public void OnPostprocessBuild(BuildReport report) { var parameter = BuildParameter.GetActiveParameter(); Debug.Log("Build End" + Environment.NewLine + JsonUtility.ToJson(parameter)); }
public static BuildOptions GetBuildOption(BuildParameter parameter) { return(BuildOptions.None); }
public static void Build(string buildParameterName) { BuildParameter.GetParameter(buildParameterName).Build(); }