Version: 2018.1

TextureImporter

class in UnityEditor

/

Inherits from:AssetImporter


Implements interfaces:ISpriteEditorDataProvider

Switch to Manual

Description

Texture importer lets you modify Texture2D import settings from editor scripts.

Settings of this class match the ones exposed in Texture Import Settings.

Variables

allowAlphaSplittingAllows alpha splitting on relevant platforms for this texture.
alphaIsTransparencyIf the provided alpha channel is transparency, enable this to prefilter the color to avoid filtering artifacts.
alphaSourceSelect how the alpha of the imported texture is generated.
alphaTestReferenceValueReturns or assigns the alpha test reference value.
androidETC2FallbackOverrideETC2 texture decompression fallback override on Android devices that don't support ETC2.
anisoLevelAnisotropic filtering level of the texture.
borderMipmapKeep texture borders the same when generating mipmaps?
compressionQualityQuality of Texture Compression in the range [0..100].
convertToNormalmapПреобразование высот в карту нормалей?
crunchedCompressionUse crunched compression when available.
fadeoutFade out mip levels to gray color?
filterModeРежим фильтрации текстур
generateCubemapCubemap generation mode.
heightmapScaleAmount of bumpyness in the heightmap.
isReadableSet this to true if you want texture data to be readable from scripts. Set it to false to prevent scripts from reading texture data.
maxTextureSizeМаксимальный размер текстуры
mipMapBiasMip map bias of the texture.
mipmapEnabledGenerate Mip Maps.
mipmapFadeDistanceEndMip level where texture is faded out completely.
mipmapFadeDistanceStartMip level where texture begins to fade out.
mipmapFilterMipmap filtering mode.
mipMapsPreserveCoverageEnables or disables coverage-preserving alpha MIP mapping.
normalmapFilterNormal map filtering mode.
npotScaleScaling mode for non power of two textures.
qualifiesForSpritePackingReturns true if this TextureImporter is setup for Sprite packing.
spriteBorderBorder sizes of the generated sprites.
spriteImportModeSelects Single or Manual import mode for Sprite textures.
spritePackingTagSelects the Sprite packing tag.
spritePivotThe point in the Sprite object's coordinate space where the graphic is located.
spritePixelsPerUnitThe number of pixels in the sprite that correspond to one unit in world space.
spritesheetArray representing the sections of the atlas corresponding to individual sprite graphics.
sRGBTextureIs texture storing color data?
textureCompressionCompression of imported texture.
textureShapeShape of imported texture.
textureTypeWhich type of texture are we dealing with here.
wrapModeTexture coordinate wrapping mode.
wrapModeUTexture U coordinate wrapping mode.
wrapModeVTexture V coordinate wrapping mode.
wrapModeWTexture W coordinate wrapping mode for Texture3D.

Public Functions

ClearPlatformTextureSettingsОчистить параметры выбранной платформы
DoesSourceTextureHaveAlphaDoes textures source image have alpha channel.
GetAutomaticFormatReturns the TextureImporterFormat that would be automatically chosen for this platform.
GetDefaultPlatformTextureSettingsGet the default platform specific texture settings.
GetPlatformTextureSettingsGet platform specific texture settings.
ReadTextureImportInstructionsReads the active texture output instructions of this TextureImporter.
ReadTextureSettingsПрочитайте настройки текстуры в классе TextureImporterSettings
SetPlatformTextureSettingsУстановите определенные параметры выбранной платформы
SetTextureSettingsSet texture importers settings from TextureImporterSettings class.

Inherited members

Variables

assetBundleNameGet or set the AssetBundle name.
assetBundleVariantПолучите или установите любые пользовательские данные.
assetPathИмя пути ассета для этого импортера. (Read Only)
importSettingsMissingThe value is true when no meta file is provided with the imported asset.
userDataПолучите или установите любые пользовательские данные.
hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Public Functions

AddRemapMap a sub-asset from an imported asset (such as an FBX file) to an external Asset of the same type.
GetExternalObjectMapGets a copy of the external object map used by the AssetImporter.
RemoveRemapRemoves an item from the map of external objects.
SaveAndReimportSave asset importer settings if asset importer is dirty.
SetAssetBundleNameAndVariantПолучите или установите любые пользовательские данные.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the GameObject.

Static Functions

GetAtPathВосстанавливает импортер ассетов для ассета в path.
DestroyУдаляет GameObject, Component или Asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961