From a928f4e9789e27a34a22d221fc3ae57e0eed6fea Mon Sep 17 00:00:00 2001 From: Juan Ignacio Molteni Date: Tue, 14 Jan 2025 12:16:24 -0300 Subject: [PATCH] Set 256 as texture size for LODs that are not 0 --- .../LODsConverter/Scripts/LODConversion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs b/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs index 873b4c3..d1cdc10 100644 --- a/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs +++ b/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs @@ -143,14 +143,14 @@ private void EnsureTextureFormat() { string assetPath = PathUtils.GetRelativePathTo(Application.dataPath, texturePath); var importer = AssetImporter.GetAtPath(assetPath) as TextureImporter; - var texture = AssetDatabase.LoadAssetAtPath(assetPath); if (importer != null) { importer.textureType = TextureImporterType.Default; importer.isReadable = true; importer.SetPlatformTextureSettings(new TextureImporterPlatformSettings { - overridden = true, maxTextureSize = texture.width, name = "Standalone", format = TextureImporterFormat.BC7, + //All LODs texture that are not 0 should have 256 as max size + overridden = true, maxTextureSize = 256, name = "Standalone", format = TextureImporterFormat.BC7, textureCompression = TextureImporterCompression.Compressed }); AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate);