fix:1、修复bug 2、删除不用的代码和资源,sdk等

This commit is contained in:
2026-05-07 14:56:44 +08:00
parent 99145facbd
commit 28d582c373
378 changed files with 79341 additions and 86716 deletions
@@ -8,6 +8,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
@@ -22,8 +23,8 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
private const string AppLovinSdkKeyLink = "https://dash.applovin.com/o/account#keys";
private const string UserTrackingUsageDescriptionDocsLink = "https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription";
private const string DocumentationTermsAndPrivacyPolicyFlow = "https://developers.applovin.com/en/unity/overview/terms-and-privacy-policy-flow";
private const string DocumentationAdaptersLink = "https://developers.applovin.com/en/unity/preparing-mediated-networks";
private const string DocumentationTermsAndPrivacyPolicyFlow = "https://support.axon.ai/en/max/unity/overview/terms-and-privacy-policy-flow";
private const string DocumentationAdaptersLink = "https://support.axon.ai/en/max/unity/preparing-mediated-networks";
private const string DocumentationNote = "Please ensure that integration instructions (e.g. permissions, ATS settings, etc) specific to each network are implemented as well. Click the link below for more info:";
private const string UninstallIconExportPath = "MaxSdk/Resources/Images/uninstall_icon.png";
private const string InfoIconExportPath = "MaxSdk/Resources/Images/info_icon.png";
@@ -223,22 +224,26 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
DrawPluginDetails();
// Draw alerts
if (pluginData != null && pluginData.Alerts != null && pluginData.Alerts.Length > 0)
if (pluginData != null && pluginData.Alerts != null)
{
EditorGUILayout.BeginHorizontal();
var showAlertDetails = DrawExpandCollapseButton(KeyShowAlerts);
EditorGUILayout.LabelField("Alerts", titleLabelStyle, GUILayout.Width(45));
DrawAlertCount();
GUILayout.FlexibleSpace();
EditorGUILayout.EndHorizontal();
if (showAlertDetails)
var alertsToShow = pluginData.Alerts.Where(alert => alert.ShouldShowAlert()).ToList();
if (alertsToShow.Count > 0)
{
DrawAlerts();
EditorGUILayout.BeginHorizontal();
var showAlertDetails = DrawExpandCollapseButton(KeyShowAlerts);
EditorGUILayout.LabelField("Alerts", titleLabelStyle, GUILayout.Width(45));
DrawAlertCount(alertsToShow);
GUILayout.FlexibleSpace();
EditorGUILayout.EndHorizontal();
if (showAlertDetails)
{
DrawAlerts(alertsToShow);
}
}
}
// Draw Micro SDK Partners
if (pluginData != null && pluginData.PartnerMicroSdks != null)
if (pluginData != null && !MaxSdkUtils.IsNullOrEmpty(pluginData.PartnerMicroSdks))
{
DrawCollapsibleSection(KeyShowMicroSdkPartners, "AppLovin Micro SDK Partners", DrawPartnerMicroSdks);
}
@@ -255,13 +260,11 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
DrawMediatedNetworks();
}
#if UNITY_2019_2_OR_NEWER
if (!AppLovinIntegrationManager.IsPluginInPackageManager)
{
EditorGUILayout.LabelField("Unity Package Manager Migration", titleLabelStyle);
DrawPluginMigrationHelper();
}
#endif
// Draw AppLovin Quality Service settings
DrawCollapsibleSection(KeyShowSdkSettings, "SDK Settings", DrawQualityServiceSettings);
@@ -388,13 +391,13 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
/// <summary>
/// Draw the number of each alert type next to the alert section header.
/// </summary>
private void DrawAlertCount()
private void DrawAlertCount(List<Alert> alerts)
{
if (pluginData == null) return;
var infoAlertsCount = pluginData.Alerts.Count(alert => alert.Severity == Severity.Info);
var warningAlertsCount = pluginData.Alerts.Count(alert => alert.Severity == Severity.Warning);
var errorAlertsCount = pluginData.Alerts.Count(alert => alert.Severity == Severity.Error);
var infoAlertsCount = alerts.Count(alert => alert.Severity == Severity.Info);
var warningAlertsCount = alerts.Count(alert => alert.Severity == Severity.Warning);
var errorAlertsCount = alerts.Count(alert => alert.Severity == Severity.Error);
GUILayout.Label(infoIcon, GUILayout.Width(20), GUILayout.Height(20));
EditorGUILayout.LabelField(AlertCountToString(infoAlertsCount), GUILayout.Width(20));
@@ -407,24 +410,24 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
/// <summary>
/// Draw the list of alerts grouped by severity.
/// </summary>
private void DrawAlerts()
private void DrawAlerts(List<Alert> alerts)
{
GUILayout.BeginHorizontal();
GUILayout.Space(10);
using (new EditorGUILayout.VerticalScope("box"))
{
DrawAlertsOfType(Severity.Error);
DrawAlertsOfType(Severity.Warning);
DrawAlertsOfType(Severity.Info);
DrawAlertsOfType(alerts, Severity.Error);
DrawAlertsOfType(alerts, Severity.Warning);
DrawAlertsOfType(alerts, Severity.Info);
}
GUILayout.Space(5);
GUILayout.EndHorizontal();
}
private void DrawAlertsOfType(Severity severity)
private void DrawAlertsOfType(List<Alert> alerts, Severity severity)
{
var alertsOfType = pluginData.Alerts.Where(alert => alert.Severity == severity).ToList();
var alertsOfType = alerts.Where(alert => alert.Severity == severity).ToList();
foreach (var alert in alertsOfType)
{
DrawAlert(alert);
@@ -642,9 +645,9 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
GUI.enabled = networkButtonsEnabled && isInstalled;
if (GUILayout.Button(new GUIContent {image = uninstallIcon, tooltip = "Uninstall"}, iconStyle))
{
EditorUtility.DisplayProgressBar("Integration Manager", "Deleting " + network.Name + "...", 0.5f);
AppLovinPackageManager.RemoveNetwork(network);
EditorUtility.ClearProgressBar();
AppLovinPackageManager.UpdateCurrentVersions(network);
UpdateShouldShowGoogleWarningIfNeeded();
}
GUI.enabled = true;
@@ -706,7 +709,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
GUILayout.Space(10);
}
#if UNITY_2019_2_OR_NEWER
private void DrawPluginMigrationHelper()
{
GUILayout.BeginHorizontal();
@@ -753,7 +755,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
GUILayout.Space(5);
GUILayout.EndHorizontal();
}
#endif
private void DrawQualityServiceSettings()
{