Version: 2020.2

TextureImporter.IsDefaultPlatformTextureFormatValid

切换到手册
public static bool IsDefaultPlatformTextureFormatValid (TextureImporterType textureType, TextureImporterFormat currentFormat);

参数

currentFormat 导入器使用的 TextureImporterType。
textureType 要验证的 TextureImporterFormat。

返回

bool 如果 ref::TextureImporterFormat:: 有效且可设置,则返回 true。否则返回 false。

描述

根据当前格式的类型 (ref::TextureImporterType::) 和默认平台验证 ref::TextureImporterFormat::。

此方法依赖于当前 Unity 安装中可用的平台。因为有些平台不是所有格式都支持,所以不能将这些格式与默认设置结合使用。使用此方法可确定格式是否有效并可设置。