private ClearPlatformTextureSettings ( string platform ) : void | ||
platform | string | |
리턴 | void |
public void Apply() { for (int i = 0; i < this.importers.Length; i++) { TextureImporter textureImporter = this.importers[i]; int compressionQuality = -1; bool flag = false; int maxTextureSize; if (this.isDefault) { maxTextureSize = textureImporter.maxTextureSize; } else { TextureImporterFormat textureImporterFormat; flag = textureImporter.GetPlatformTextureSettings(this.name, out maxTextureSize, out textureImporterFormat, out compressionQuality); } if (!flag) { maxTextureSize = textureImporter.maxTextureSize; } if (!this.m_MaxTextureSizeIsDifferent) { maxTextureSize = this.m_MaxTextureSize; } if (!this.m_CompressionQualityIsDifferent) { compressionQuality = this.m_CompressionQuality; } if (!this.isDefault) { if (!this.m_OverriddenIsDifferent) { flag = this.m_Overridden; } bool allowsAlphaSplitting = textureImporter.GetAllowsAlphaSplitting(); if (flag) { textureImporter.SetPlatformTextureSettings(this.name, maxTextureSize, this.m_TextureFormatArray[i], compressionQuality, allowsAlphaSplitting); } else { textureImporter.ClearPlatformTextureSettings(this.name); } } else { textureImporter.maxTextureSize = maxTextureSize; textureImporter.textureFormat = this.m_TextureFormatArray[i]; textureImporter.compressionQuality = compressionQuality; } } }
static void ClearPlatformOverrides(string platformName, TextureImporter importer) { //Workaround: without this AssetDatabase.ImportAsset() not working importer.SetPlatformTextureSettings(platformName, 0, 0); importer.ClearPlatformTextureSettings(platformName); }