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 安装中可用的平台。因为有些平台不是所有格式都支持,所以不能将这些格式与默认设置结合使用。使用此方法可确定格式是否有效并可设置。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961