fix:1、删除部分不用的资源代码。2、a面修复bug

This commit is contained in:
barry
2026-04-28 18:42:00 +08:00
parent 70d45d4705
commit cc12dffbaa
417 changed files with 36736 additions and 40575 deletions
@@ -31,20 +31,14 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
{
private const string AppLovinMediationAmazonAdapterDependenciesPath = "Amazon/Scripts/Mediations/AppLovinMediation/Editor/Dependencies.xml";
#if UNITY_2019_2_OR_NEWER
private static readonly IPackageManagerClient _upmPackageManager = new AppLovinUpmPackageManager();
#endif
private static readonly IPackageManagerClient _assetsPackageManager = new AppLovinAssetsPackageManager();
private static IPackageManagerClient PackageManagerClient
{
get
{
#if UNITY_2019_2_OR_NEWER
return AppLovinIntegrationManager.IsPluginInPackageManager ? _upmPackageManager : _assetsPackageManager;
#else
return _assetsPackageManager;
#endif
}
}
@@ -110,10 +104,8 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
var installedNetworksInAssets = AppLovinAssetsPackageManager.GetInstalledMediationNetworks();
installedNetworks.AddRange(installedNetworksInAssets);
#if UNITY_2019_2_OR_NEWER
var installedNetworksInPackages = AppLovinUpmPackageManager.GetInstalledMediationNetworks();
installedNetworks.AddRange(installedNetworksInPackages);
#endif
if (IsAmazonAppLovinAdapterInstalled())
{
@@ -155,7 +147,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
/// <returns>The exported path of the MAX plugin asset or an empty list if the asset is not found.</returns>
private static List<string> GetAssetPathListForExportPath(string exportPath)
{
var assetLabelToFind = "l:al_max_export_path-" + exportPath.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
var assetLabelToFind = "l:al_max_export_path-" + MaxSdkUtils.NormalizeToUnityPath(exportPath);
var assetGuids = AssetDatabase.FindAssets(assetLabelToFind);
var assetPaths = new List<string>();
@@ -174,12 +166,10 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
internal static void UpdateCurrentVersions(Network network)
{
var assetPaths = GetAssetPathListForExportPath(network.DependenciesFilePath);
#if UNITY_2019_2_OR_NEWER
if (HasDuplicateAdapters(assetPaths))
{
ShowDeleteDuplicateAdapterPrompt(network);
}
#endif
var currentVersions = GetCurrentVersions(assetPaths);
network.CurrentVersions = currentVersions;
@@ -237,7 +227,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
}
#if UNITY_2019_2_OR_NEWER
/// <summary>
/// Checks whether a network has duplicate adapters installed in both the Assets folder and via UPM.
/// </summary>
@@ -274,6 +263,9 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
/// otherwise, deletes the adapter from the Assets folder.</param>
internal static void DeleteDuplicateAdapter(Network network, bool keepAssetsAdapter)
{
// Skip duplicate removal logic for our plugin.
if (network.Name.Equals("APPLOVIN_NETWORK")) return;
if (keepAssetsAdapter)
{
var appLovinManifest = AppLovinUpmManifest.Load();
@@ -292,7 +284,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
AppLovinUpmPackageManager.ResolvePackageManager();
}
#endif
/// <summary>
/// Gets the current versions for a given network's dependency file paths. UPM will have multiple paths
@@ -426,7 +417,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
#endregion
}
#if UNITY_2019_2_OR_NEWER
public class AppLovinUpmPackageManager : IPackageManagerClient
{
public const string PackageNamePrefixAppLovin = "com.applovin.mediation.ads";
@@ -595,8 +585,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
}
#endif
public class AppLovinAssetsPackageManager : IPackageManagerClient
{
public static List<string> GetInstalledMediationNetworks()