ドキュメント

Unity Engine

Unity Engine

IsPlatformTextureFormatValid(TextureImporterType, BuildTarget, TextureImporterFormat)

Validates TextureImporterFormat based on a specified import type ( TextureImporterType ) and a specified build target ( BuildTarget.).
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static bool IsPlatformTextureFormatValid(TextureImporterType textureType, BuildTarget target, TextureImporterFormat currentFormat)

Parameters

The TextureImporterType that the importer uses.

The platform that the setting targets, referred to as the BuilTarget.

The TextureImporterFormat to validate.

Returns

Type

Description

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

Remarks

TextureImporterFormat is not available for all platforms based on the TextureImporterType of a given Texture. Use this method to check that the format set with TextureImporter.SetPlatformTextureSettings is a valid format.