Version: 2021.3

TextureImporter.IsDefaultPlatformTextureFormatValid

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

参数

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

返回

bool Returns true if TextureImporterFormat is valid and can be set. Returns false otherwise.

描述

Validates TextureImporterFormat based on the type of the current format (TextureImporterType) and the default platform.

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

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