diff --git a/CHANGELOG.md b/CHANGELOG.md index 1713503f..66a9684a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog All notable changes to this project will be documented in this file using the standards as defined at [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0). -## Version 4.2.0 *(2023-05-04)* +## Version 4.2.1 *(2023-05-05)* +Bug Fixes: +- Fixed an issue where package information failed to load if projects had a large amount of packages. +- Fixed an issue where main SDK dependency could not be generated through UPM implementation. +## Version 4.2.0 *(2023-05-04)* Added: - Editor Window, `AdaptersWindow.cs`, for Chartboost Mediation adapters handling. For capabilities, see below: * Ad Adapters are now decoupled from the Chartboost Mediation UPM package. diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AmazonPublisherServicesDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AmazonPublisherServicesDependencies.xml index f1aaeb69..068d0628 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AmazonPublisherServicesDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AmazonPublisherServicesDependencies.xml @@ -2,10 +2,10 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AppLovinDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AppLovinDependencies.xml index 1fc0e5a6..7d51279a 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AppLovinDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/AppLovinDependencies.xml @@ -2,10 +2,10 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/DigitalTurbineExchangeDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/DigitalTurbineExchangeDependencies.xml index d6c69af6..19811d22 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/DigitalTurbineExchangeDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/DigitalTurbineExchangeDependencies.xml @@ -10,9 +10,9 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/IronSourceDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/IronSourceDependencies.xml index f46de4b1..7e98835e 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/IronSourceDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/IronSourceDependencies.xml @@ -2,10 +2,10 @@ - + - + @@ -14,9 +14,9 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/MetaAudienceNetworkDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/MetaAudienceNetworkDependencies.xml index 6405660d..52ec9847 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/MetaAudienceNetworkDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/MetaAudienceNetworkDependencies.xml @@ -2,10 +2,10 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/UnityAdsDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/UnityAdsDependencies.xml index 5abd3df8..add8e0e1 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/UnityAdsDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/UnityAdsDependencies.xml @@ -2,10 +2,10 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/VungleDependencies.xml b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/VungleDependencies.xml index 05d086c1..f73097f0 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/VungleDependencies.xml +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/Adapters/VungleDependencies.xml @@ -11,9 +11,9 @@ - + - + diff --git a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/selections.json b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/selections.json index 82baf636..67ca41dc 100644 --- a/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/selections.json +++ b/com.chartboost.mediation.demo/Assets/com.chartboost.mediation/Editor/selections.json @@ -1,5 +1,5 @@ { - "mediationVersion": "4.2.0", + "mediationVersion": "4.2.1", "adapterSelections": [ { "id": "adcolony", @@ -13,12 +13,12 @@ }, { "id": "aps", - "android": "9.7.0", + "android": "9.7.1", "ios": "4.6.0" }, { "id": "applovin", - "android": "11.8.1", + "android": "11.8.2", "ios": "11.8.0" }, { @@ -29,7 +29,7 @@ { "id": "digitalturbine", "android": "8.2.2", - "ios": "8.1.9" + "ios": "8.2.1" }, { "id": "googlebidding", @@ -43,12 +43,12 @@ }, { "id": "ironsource", - "android": "7.2.7.0", - "ios": "7.2.6.0" + "android": "7.3.0.0", + "ios": "7.2.7.0" }, { "id": "meta", - "android": "6.12.0", + "android": "6.13.7", "ios": "6.12.0" }, { @@ -68,13 +68,13 @@ }, { "id": "unityads", - "android": "4.6.0", + "android": "4.6.1", "ios": "4.6.0" }, { "id": "vungle", "android": "6.12.1", - "ios": "6.12.2" + "ios": "6.12.3" }, { "id": "yahoo", diff --git a/com.chartboost.mediation.demo/Packages/manifest.json b/com.chartboost.mediation.demo/Packages/manifest.json index 9ccb60a0..ddfcd3d1 100644 --- a/com.chartboost.mediation.demo/Packages/manifest.json +++ b/com.chartboost.mediation.demo/Packages/manifest.json @@ -5,7 +5,7 @@ "com.unity.ide.rider": "3.0.16", "com.unity.ide.visualstudio": "2.0.16", "com.unity.ide.vscode": "1.2.5", - "com.unity.test-framework": "1.1.31", + "com.unity.test-framework": "1.1.33", "com.unity.textmeshpro": "3.0.6", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", diff --git a/com.chartboost.mediation.demo/Packages/packages-lock.json b/com.chartboost.mediation.demo/Packages/packages-lock.json index 223df0d7..d56071c8 100644 --- a/com.chartboost.mediation.demo/Packages/packages-lock.json +++ b/com.chartboost.mediation.demo/Packages/packages-lock.json @@ -54,7 +54,7 @@ "url": "https://packages.unity.com" }, "com.unity.test-framework": { - "version": "1.1.31", + "version": "1.1.33", "depth": 0, "source": "registry", "dependencies": { diff --git a/com.chartboost.mediation/CHANGELOG.md b/com.chartboost.mediation/CHANGELOG.md index 1713503f..66a9684a 100644 --- a/com.chartboost.mediation/CHANGELOG.md +++ b/com.chartboost.mediation/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog All notable changes to this project will be documented in this file using the standards as defined at [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0). -## Version 4.2.0 *(2023-05-04)* +## Version 4.2.1 *(2023-05-05)* +Bug Fixes: +- Fixed an issue where package information failed to load if projects had a large amount of packages. +- Fixed an issue where main SDK dependency could not be generated through UPM implementation. +## Version 4.2.0 *(2023-05-04)* Added: - Editor Window, `AdaptersWindow.cs`, for Chartboost Mediation adapters handling. For capabilities, see below: * Ad Adapters are now decoupled from the Chartboost Mediation UPM package. diff --git a/com.chartboost.mediation/Editor/Adapters/AdaptersWindow.cs b/com.chartboost.mediation/Editor/Adapters/AdaptersWindow.cs index 1989f9fd..9c6e2458 100644 --- a/com.chartboost.mediation/Editor/Adapters/AdaptersWindow.cs +++ b/com.chartboost.mediation/Editor/Adapters/AdaptersWindow.cs @@ -5,6 +5,7 @@ using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; +using PackageInfo = UnityEditor.PackageManager.PackageInfo; namespace Chartboost.Editor.Adapters { @@ -36,6 +37,9 @@ public partial class AdaptersWindow : EditorWindow private static Button _saveButton; private static Button _warningButton; + private static PackageInfo ChartboostMediationPackage => _mediationPackage ??= Utilities.FindPackage(Constants.ChartboostMediationPackageName); + private static PackageInfo _mediationPackage; + private static AdaptersWindow Instance { get { @@ -84,21 +88,19 @@ private static void CheckMediationVersion(VisualElement root) scaleMode = ScaleMode.ScaleToFit }; - var package = Utilities.FindPackage(Constants.ChartboostMediationPackageName); - _warningButton = new Button(() => CheckChartboostMediationVersion()); _warningButton.name = "warning-button"; _warningButton.Add(logo); if (string.IsNullOrEmpty(MediationSelection) || !Constants.PathToMainDependency.FileExist()) { - _warningButton.tooltip = $"Dependencies for Chartboost Mediation {package.version} have not been found. Press to add."; + _warningButton.tooltip = $"Dependencies for Chartboost Mediation {ChartboostMediationPackage.version} have not been found. Press to add."; root.Add(_warningButton); return; } var version = new Version(MediationSelection); - var packageVersion = new Version(package.version); + var packageVersion = new Version(ChartboostMediationPackage.version); if (version != packageVersion) { diff --git a/com.chartboost.mediation/Editor/Adapters/AdaptersWindowUtilities.cs b/com.chartboost.mediation/Editor/Adapters/AdaptersWindowUtilities.cs index ab4bc5e7..068b6ab8 100644 --- a/com.chartboost.mediation/Editor/Adapters/AdaptersWindowUtilities.cs +++ b/com.chartboost.mediation/Editor/Adapters/AdaptersWindowUtilities.cs @@ -122,15 +122,18 @@ public static bool CheckChartboostMediationVersion() { if (!Application.isBatchMode && _warningButton != null) _warningButton.RemoveFromHierarchy(); - var package = Utilities.FindPackage(Constants.ChartboostMediationPackageName); - var version = new Version(MediationSelection); - var packageVersion = new Version(package.version); + if (!string.IsNullOrEmpty(MediationSelection) && ChartboostMediationPackage != null) + { + var version = new Version(MediationSelection); + var packageVersion = new Version(ChartboostMediationPackage.version); + + if (Constants.PathToMainDependency.FileExist() && version == packageVersion) + return false; + } - if (!string.IsNullOrEmpty(MediationSelection) && Constants.PathToMainDependency.FileExist() && - version == packageVersion) return false; - - MediationSelection = package.version; + if (ChartboostMediationPackage != null) + MediationSelection = ChartboostMediationPackage.version; GenerateChartboostMediationDependency(); return true; } @@ -172,6 +175,7 @@ private static void Refresh(bool ignore = true) { if (!Application.isBatchMode) Instance.rootVisualElement.Clear(); + _mediationPackage = Utilities.FindPackage(Constants.ChartboostMediationPackageName); AdapterDataSource.Update(); Initialize(); if (!Application.isBatchMode|| !ignore) diff --git a/com.chartboost.mediation/Editor/Utilities.cs b/com.chartboost.mediation/Editor/Utilities.cs index e949dc21..237d2459 100644 --- a/com.chartboost.mediation/Editor/Utilities.cs +++ b/com.chartboost.mediation/Editor/Utilities.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text.RegularExpressions; using UnityEditor; -using UnityEngine; +using UnityEditor.PackageManager; using Object = UnityEngine.Object; using PackageInfo = UnityEditor.PackageManager.PackageInfo; @@ -14,11 +14,11 @@ public static class Utilities { public static PackageInfo FindPackage(string packageName) { - var packageJsons = AssetDatabase.FindAssets("package") - .Select(AssetDatabase.GUIDToAssetPath).Where(x => AssetDatabase.LoadAssetAtPath(x) != null) - .Select(PackageInfo.FindForAssetPath).ToList(); - - return packageJsons.Find(x => x.name == packageName); + var packages = Client.List(false, false); + while (!packages.IsCompleted) { } + var packageInfos = packages.Result.ToList(); + var desiredPackage = packageInfos.Find(x => x.name == packageName); + return desiredPackage; } private static readonly Regex SWhitespace = new Regex(@"\s+"); diff --git a/com.chartboost.mediation/package.json b/com.chartboost.mediation/package.json index 44a80f50..19a4c177 100644 --- a/com.chartboost.mediation/package.json +++ b/com.chartboost.mediation/package.json @@ -1,6 +1,6 @@ { "name": "com.chartboost.mediation", - "version": "4.2.0", + "version": "4.2.1", "displayName": "Chartboost Mediation", "description": "The Chartboost Mediation Unity SDK. Better monetization powered by bidding", "unity": "2020.3",