From 43f20bcf2fbb8f08b53a98a14503a705445259bf Mon Sep 17 00:00:00 2001 From: SCastanedaMunoz Date: Fri, 7 Jul 2023 13:48:22 -0500 Subject: [PATCH] Fixing Bug with Postprocessor --- .../BuildTools/ChartboostMediationPostprocessor.cs | 12 ++++++++---- .../BuildTools/ChartboostMediationPreprocessor.cs | 3 +-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPostprocessor.cs b/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPostprocessor.cs index e5f44d9d..a935f5fd 100644 --- a/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPostprocessor.cs +++ b/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPostprocessor.cs @@ -1,5 +1,6 @@ using UnityEditor; -using UnityEditor.Callbacks; +using UnityEditor.Build; +using UnityEditor.Build.Reporting; #if UNITY_IOS using System.Collections.Generic; using UnityEditor.iOS.Xcode; @@ -11,11 +12,14 @@ namespace Chartboost.Editor.BuildTools { - internal sealed class ChartboostMediationPostprocessor + internal sealed class ChartboostMediationPostprocessor : IPostprocessBuildWithReport { - [PostProcessBuild] - public static void PostProcess(BuildTarget buildTarget, string pathToBuiltProject) + public int callbackOrder { get; } + public void OnPostprocessBuild(BuildReport report) { + var buildTarget = report.summary.platform; + var pathToBuiltProject = report.summary.outputPath; + if (buildTarget != BuildTarget.iOS) return; diff --git a/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPreprocessor.cs b/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPreprocessor.cs index 15a45d5b..e6bdf791 100644 --- a/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPreprocessor.cs +++ b/com.chartboost.mediation/Editor/BuildTools/ChartboostMediationPreprocessor.cs @@ -8,10 +8,9 @@ namespace Chartboost.Editor.BuildTools { - public class ChartboostMediationPreprocessor : IPreprocessBuildWithReport + internal class ChartboostMediationPreprocessor : IPreprocessBuildWithReport { public int callbackOrder { get; } - public void OnPreprocessBuild(BuildReport report) { if (report.summary.platform != BuildTarget.Android)