Remove minigame publish result dialogs

This commit is contained in:
ud18010
2026-08-10 19:59:05 +08:00
parent ef7f24738e
commit c8eaeb3950
3 changed files with 30 additions and 2 deletions
@@ -192,12 +192,10 @@ namespace XGame.Editor
foreach (var kv in outClients)
sb.AppendLine($"客户端[{kv.Key}]: " + Path.Combine(cdnVerDir, kv.Key));
Debug.Log("[MiniGamePublish] " + sb);
EditorUtility.DisplayDialog("生成小游戏更新", sb.ToString(), "OK");
}
catch (Exception e)
{
Debug.LogError("[MiniGamePublish] 失败: " + e);
EditorUtility.DisplayDialog("生成小游戏更新失败", e.Message, "OK");
}
finally
{
@@ -0,0 +1,19 @@
using System.IO;
using System.Text.RegularExpressions;
using NUnit.Framework;
public sealed class MiniGamePublishPipelineTests
{
[Test]
public void Run_DoesNotShowModalResultDialogs()
{
string source = File.ReadAllText("Assets/Editor/MiniGamePublishPipeline.cs");
Assert.IsFalse(
Regex.IsMatch(source, @"EditorUtility\.DisplayDialog\([^\n;]*sb\.ToString\(\)[^\n;]*\)"),
"Successful publish results should be written to the Unity log instead of a modal dialog.");
Assert.IsFalse(
Regex.IsMatch(source, @"EditorUtility\.DisplayDialog\([^\n;]*e\.Message[^\n;]*\)"),
"Failed publish results should be written to the Unity log instead of a modal dialog.");
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7cddb2952e1d0d946ad2f6feb0522f94
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: