From d5c61ed998a38d62a03f4d58e4d2fe9516d27ea3 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 24 九月 2026 14:51:26 +0800
Subject: [PATCH] 自动图集设置

---
 Assets/Editor/Tool/FixSpriteAtlasWebGLAlpha.cs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Assets/Editor/Tool/FixSpriteAtlasWebGLAlpha.cs b/Assets/Editor/Tool/FixSpriteAtlasWebGLAlpha.cs
index 96b1e46..fa309e3 100644
--- a/Assets/Editor/Tool/FixSpriteAtlasWebGLAlpha.cs
+++ b/Assets/Editor/Tool/FixSpriteAtlasWebGLAlpha.cs
@@ -36,14 +36,16 @@
                 var webGLSettings = importer.GetPlatformSettings("WebGL");
 
                 // 宸叉湁 WebGL 瑕嗙洊涓斿凡鏄洰鏍囨牸寮忓垯璺宠繃
-                if (webGLSettings.overridden && webGLSettings.format == TextureImporterFormat.ASTC_8x8)
+                if (webGLSettings.overridden
+                    && webGLSettings.maxTextureSize == TexturePlatformFormatHelper.ATLAS_MAX_SIZE
+                    && webGLSettings.format == TextureImporterFormat.ASTC_8x8)
                 {
                     continue;
                 }
 
                 // ASTC 8x8 鈥� 鍚� Alpha 閫氶亾锛屼笌 Android/iPhone 淇濇寔涓�鑷�
                 webGLSettings.overridden = true;
-                webGLSettings.maxTextureSize = 2048;
+                webGLSettings.maxTextureSize = TexturePlatformFormatHelper.ATLAS_MAX_SIZE;
                 webGLSettings.textureCompression = TextureImporterCompression.Compressed;
                 webGLSettings.format = TextureImporterFormat.ASTC_8x8;
                 webGLSettings.compressionQuality = 50;

--
Gitblit v1.8.0