From e35c8e096041b3cf97d91677bf8d6c4587223a9b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 18 九月 2025 17:59:17 +0800
Subject: [PATCH] 0312 大部分字体改用overflow处理;新图集
---
Assets/Editor/SpritePacking/SpriteSettings.asset | 22 ++++++++++++++++++++++
Assets/Editor/Tool/ChangePrefabsFontSize.cs | 14 +++++++++-----
2 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/Assets/Editor/SpritePacking/SpriteSettings.asset b/Assets/Editor/SpritePacking/SpriteSettings.asset
index 214f02d..eec8d15 100644
--- a/Assets/Editor/SpritePacking/SpriteSettings.asset
+++ b/Assets/Editor/SpritePacking/SpriteSettings.asset
@@ -519,3 +519,25 @@
maxTextureSize: 2048
textureCompression: 1
textureFormat: 50
+ - folderName: Settlement
+ blockOffset: 1
+ enableRotation: 0
+ enableTightPacking: 0
+ padding: 4
+ readable: 0
+ generateMipMaps: 0
+ sRGB: 1
+ filterMode: 1
+ platformSettings:
+ - name: Standalone
+ maxTextureSize: 2048
+ textureCompression: 1
+ textureFormat: 4
+ - name: Android
+ maxTextureSize: 2048
+ textureCompression: 1
+ textureFormat: 50
+ - name: iPhone
+ maxTextureSize: 2048
+ textureCompression: 1
+ textureFormat: 50
diff --git a/Assets/Editor/Tool/ChangePrefabsFontSize.cs b/Assets/Editor/Tool/ChangePrefabsFontSize.cs
index 1412f46..729f660 100644
--- a/Assets/Editor/Tool/ChangePrefabsFontSize.cs
+++ b/Assets/Editor/Tool/ChangePrefabsFontSize.cs
@@ -23,7 +23,7 @@
{
Change();
}
- if (GUILayout.Button("妫�娴嬪瓧浣撳拰rect鐨勯珮搴�"))
+ if (GUILayout.Button("妫�娴嬪瓧浣撳拰鑷�傚簲鐨勫叧绯�"))
{
FindSmallRect();
}
@@ -62,9 +62,13 @@
foreach (Text item in transArr14)
{
- if (item.rectTransform.sizeDelta.y - item.fontSize <= 3)
- {
- Debug.LogFormat("鐣岄潰 {0} 瀛椾綋妫�娴嬪お灏� {1}锛� {2}", file, item.rectTransform.sizeDelta.y, item.fontSize);
+ if (item.verticalOverflow == VerticalWrapMode.Overflow || item.horizontalOverflow == HorizontalWrapMode.Overflow)
+ {
+ var target = item.GetComponent<ContentSizeFitter>();
+ if (target != null)
+ {
+ Debug.LogErrorFormat("瀛樺湪overflwer鍜孋ontentSizeFitter 鍐茬獊鐨勯鍒朵綋 {0} - {1}", file, item.name);
+ }
}
}
@@ -74,7 +78,7 @@
if (isCancel || startIndex >= filepaths.Length)
{
- Debug.LogFormat("妫�娴嬪瓧浣撳拰rect鐨勯珮搴�--妫�绱0}涓鍒朵綋, 瀛椾綋鎬讳釜鏁皗1}", startIndex, a);
+ Debug.LogFormat("妫�娴嬪瓧浣撳拰鑷�傚簲鐨勫叧绯�--妫�绱0}涓鍒朵綋, 瀛椾綋鎬讳釜鏁皗1}", startIndex, a);
EditorUtility.ClearProgressBar();
EditorApplication.update = null;
startIndex = 0;
--
Gitblit v1.8.0