三国卡牌客户端基础资源仓库
yyl
3 天以前 6001904b846cd53ce6715967a9d22a313c94e0d9
125 【战斗】战斗系统 图集设置 查重新增关键词匹配
2个文件已修改
44 ■■■■ 已修改文件
Assets/Editor/SpritePacking/SpriteSettings.asset 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/UI/AssetDuplicateCheck.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/SpritePacking/SpriteSettings.asset
@@ -497,3 +497,25 @@
      maxTextureSize: 2048
      textureCompression: 1
      textureFormat: 50
  - folderName: BossBattle
    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
Assets/Editor/UI/AssetDuplicateCheck.cs
@@ -21,7 +21,7 @@
        private bool includeSubfolders = true;
        private bool compareByContent = true;
        private bool compareByName = false;
        private int minFileSize = 10;
        private int minFileSize = 100;
        
        private Dictionary<string, List<string>> duplicateGroups = new Dictionary<string, List<string>>();
        private int totalFilesScanned = 0;
@@ -36,6 +36,9 @@
        private bool isProcessing = false;
        private float progress = 0f;
        private string progressInfo = "";
        private string filterString = "";
        private bool enableFilter = false;
        [MenuItem("工具/资源管理/资源查重工具")]
        public static void ShowWindow()
@@ -84,6 +87,13 @@
            }
            EditorGUILayout.Space();
            // 搜索结果过滤功能
            EditorGUILayout.BeginVertical();
            enableFilter = EditorGUILayout.Toggle("启用结果过滤", enableFilter, GUILayout.Width(120));
            EditorGUILayout.Space();
            filterString = EditorGUILayout.TextField("过滤字符串", filterString);
            EditorGUILayout.EndVertical();
            if (duplicateGroups.Count > 0)
            {
@@ -168,7 +178,7 @@
            includeSubfolders = EditorGUILayout.Toggle("包含子文件夹", includeSubfolders);
            compareByContent = EditorGUILayout.Toggle("按内容比较", compareByContent);
            compareByName = EditorGUILayout.Toggle("按名称比较", compareByName);
            minFileSize = EditorGUILayout.IntField("最小文件大小 (KB)", minFileSize);
            minFileSize = EditorGUILayout.IntField("最小文件大小 (B)", minFileSize);
            
            EditorGUILayout.Space();
            EditorGUILayout.LabelField("处理选项:");
@@ -224,6 +234,10 @@
            int groupIndex = 0;
            foreach (var group in duplicateGroups)
            {
                // 过滤逻辑:只显示包含过滤字符串的组
                if (enableFilter && !group.Value.Any(f => Path.GetFileName(f).IndexOf(filterString, StringComparison.OrdinalIgnoreCase) >= 0))
                    continue;
                if (group.Value.Count <= 1) continue;
                
                groupIndex++;
@@ -386,7 +400,7 @@
                    
                    // 检查文件大小
                    FileInfo fileInfo = new FileInfo(fullPath);
                    if (!fileInfo.Exists || fileInfo.Length < minFileSize * 1024) continue;
                    if (!fileInfo.Exists || fileInfo.Length < minFileSize) continue;
                    
                    string key = "";
                    
@@ -527,8 +541,6 @@
                        
                        // 更新引用关系,将引用从filePath重定向到keepFile
                        UpdateReferences(filePath, keepFile);
                        // ... existing code ...
                        
                        // 创建备份和删除文件的代码
                    }