1
This commit is contained in:
@@ -9,7 +9,7 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b29e98153ec2fbd44b8f7da1b41194e8, type: 3}
|
||||
m_Script: {fileID: 0}
|
||||
m_Name: SpineSettings
|
||||
m_EditorClassIdentifier:
|
||||
defaultScale: 0.01
|
||||
@@ -19,13 +19,13 @@ MonoBehaviour:
|
||||
defaultInstantiateLoop: 1
|
||||
showHierarchyIcons: 1
|
||||
setTextureImporterSettings: 1
|
||||
textureSettingsReference: Assets/Spine/Editor/spine-unity/Editor/ImporterPresets/PMATexturePreset.preset
|
||||
textureSettingsReference:
|
||||
blendModeMaterialMultiply: {fileID: 0}
|
||||
blendModeMaterialScreen: {fileID: 0}
|
||||
blendModeMaterialAdditive: {fileID: 0}
|
||||
atlasTxtImportWarning: 0
|
||||
textureImporterWarning: 0
|
||||
componentMaterialWarning: 0
|
||||
atlasTxtImportWarning: 1
|
||||
textureImporterWarning: 1
|
||||
componentMaterialWarning: 1
|
||||
autoReloadSceneSkeletons: 1
|
||||
handleScale: 1
|
||||
mecanimEventIncludeFolderName: 1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.U2D;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 一键修复炮台/翅膀/战神三个图集的边缘渗色(设置存在 .meta 的 SpriteAtlasImporter 里):
|
||||
/// 1) Padding 4 → 8(隔开相邻 sprite,大于 ASTC 压缩块尺寸,根治相邻像素渗色)
|
||||
/// 2) 平台压缩 ASTC 6x6 → 4x4(质量档提高,减少压缩糊边/杂边)
|
||||
/// 3) 尺寸上限 1024 → 2048(避免整体缩小带来的模糊)
|
||||
/// 改动后必须:重建 Addressables 内容 → 重出包。
|
||||
/// </summary>
|
||||
public static class TurretAtlasBleedingFix
|
||||
{
|
||||
private static readonly string[] Atlases =
|
||||
{
|
||||
"Assets/MyGame/aa/UI/Atlases/PaoTaiSprite.spriteatlasv2",
|
||||
"Assets/MyGame/aa/UI/Atlases/chibangSprite.spriteatlasv2",
|
||||
"Assets/MyGame/aa/UI/Atlases/ZhanShenSprite.spriteatlasv2",
|
||||
};
|
||||
|
||||
[MenuItem("Tools/图集工具/修复炮台三图集边缘渗色")]
|
||||
public static void Fix()
|
||||
{
|
||||
foreach (var path in Atlases)
|
||||
{
|
||||
var importer = AssetImporter.GetAtPath(path) as SpriteAtlasImporter;
|
||||
if (importer == null)
|
||||
{
|
||||
Debug.LogWarning($"[图集修复] 跳过(不是 SpriteAtlasImporter): {path}");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 1) Padding 4 → 8
|
||||
var packing = importer.packingSettings;
|
||||
packing.padding = 8;
|
||||
importer.packingSettings = packing;
|
||||
|
||||
// 2) 平台压缩与尺寸:ASTC 4x4 + 上限 2048
|
||||
var android = importer.GetPlatformSettings("Android");
|
||||
if (android != null)
|
||||
{
|
||||
android.overridden = true;
|
||||
android.format = TextureImporterFormat.ASTC_4x4;
|
||||
android.maxTextureSize = 2048;
|
||||
importer.SetPlatformSettings(android);
|
||||
}
|
||||
var iphone = importer.GetPlatformSettings("iPhone");
|
||||
if (iphone != null)
|
||||
{
|
||||
iphone.overridden = true;
|
||||
iphone.format = TextureImporterFormat.ASTC_4x4;
|
||||
iphone.maxTextureSize = 2048;
|
||||
importer.SetPlatformSettings(iphone);
|
||||
}
|
||||
|
||||
importer.SaveAndReimport();
|
||||
Debug.Log($"[图集修复] {System.IO.Path.GetFileName(path)} → padding=8, ASTC 4x4, 上限2048");
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
Debug.Log("[图集修复] 完成 —— 请重建 Addressables 内容后重出包");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b39dc75916801143b04a2619782ab66
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user