纹理导入器允许您从编辑器脚本修改 Texture2D 导入设置。
Settings of this class cover most of the settings exposed in Texture Import Settings. Some settings require you to use TextureImporterSettings. Refer to TextureImporter.SetTextureSettings).
allowAlphaSplitting | 允许在相关平台上对此纹理进行 Alpha 通道分离。 |
alphaIsTransparency | If the alpha channel of your texture represents transparency, enable this property to dilate the color channels of visible texels into fully transparent areas. This effectively adds padding around transparent areas that prevents filtering artifacts from forming on their edges. Unity does not support this property for HDR textures.This property makes the color data of invisible texels undefined. Disable this property to preserve invisible texels' original color data. |
alphaSource | 选择生成导入纹理的 Alpha 的方式。 |
alphaTestReferenceValue | 返回或分配 Alpha 测试参考值。 |
androidETC2FallbackOverride | 不支持 ETC2 的 Android 设备上的 ETC2 纹理解压缩回退重载。 |
anisoLevel | 纹理的各向异性过滤级别。 |
borderMipmap | Keeps texture borders the same when generating mipmaps. |
compressionQuality | The quality of Crunch texture compression. The range is 0 through 100. A higher quality means larger textures and longer compression times. |
convertToNormalmap | Convert heightmap to normal map |
crunchedCompression | 使用经过 Crunch 处理的压缩(如果可用)。 |
fadeout | Fade out mip levels to gray color. |
filterMode | 纹理的过滤模式。 |
flipGreenChannel | Indicates whether to invert the green channel values of a normal map. |
generateCubemap | 立方体贴图生成模式。 |
heightmapScale | 高度贴图中的凹凸程度。 |
ignoreMipmapLimit | Enable this flag for textures that should ignore mipmap limit settings. |
ignorePngGamma | Ignore the Gamma attribute in PNG files. This property does not effect other file formats. |
isReadable | Whether Unity stores an additional copy of the imported texture's pixel data in CPU-addressable memory. |
maxTextureSize | 最大纹理大小。 |
mipMapBias | 纹理的多级渐进纹理偏差。 |
mipmapEnabled | 生成 MipMap。 |
mipmapFadeDistanceEnd | 纹理完全淡出的 Mip 级别。 |
mipmapFadeDistanceStart | 纹理开始淡出的 Mip 级别。 |
mipmapFilter | Mipmap 过滤模式。 |
mipmapLimitGroupName | Name of the texture mipmap limit group to which this texture belongs. |
mipMapsPreserveCoverage | Enables or disables coverage-preserving alpha mipmapping. |
normalmapFilter | 法线贴图过滤模式。 |
npotScale | 非二次幂纹理的缩放模式。 |
qualifiesForSpritePacking | 如果为精灵打包设置了此 TextureImporter,则返回 true。 |
secondarySpriteTextures | 用于导入的精灵的辅助纹理。 |
spriteBorder | 生成的精灵的边框大小。 |
spriteImportMode | 为精灵纹理选择 Single 或 Manual 导入模式。 |
spritePivot | 精灵对象坐标空间中图形所在的点。 |
spritePixelsPerUnit | 对应世界空间中一个单位的精灵中的像素数。 |
sRGBTexture | Whether this texture stores data in sRGB (also called gamma) color space. |
streamingMipmaps | 为此纹理启用 Mipmap 串流。 |
streamingMipmapsPriority | 在减小内存大小以达到内存预算时此纹理的相对优先级。 |
swizzleA | Specifies the source for the texture's alpha color channel data. |
swizzleB | Specifies the source for the texture's blue color channel data. |
swizzleG | Specifies the source for the texture's green color channel data. |
swizzleR | Specifies the source for the texture's red color channel data. |
textureCompression | 导入纹理的压缩。 |
textureShape | The shape of the imported texture. |
textureType | 我们现在处理的纹理类型。 |
vtOnly | When enabled, this texture can solely be used in combination with a Texture Stack for Virtual Texturing. When enabled the texture is not guaranteed to be available as a Texture2D in the Player (e.g., not accessible from a script). When disabled, the Player includes the texture both as a Texture2D (e.g., accessible from script) and as a streamable texture in a Texture Stack. |
wrapMode | 纹理坐标换行模式。 |
wrapModeU | 纹理 U 坐标换行模式。 |
wrapModeV | 纹理 V 坐标换行模式。 |
wrapModeW | Texture3D 的纹理 W 坐标换行模式。 |
ClearPlatformTextureSettings | Clears specific target platform settings. |
DoesSourceTextureHaveAlpha | Allows you to check whether the texture source image has an alpha channel. |
GetAutomaticFormat | 返回将为此平台自动选择的 TextureImporterFormat。 |
GetDefaultPlatformTextureSettings | Gets the default platform specific texture settings. |
GetPlatformTextureSettings | Gets platform specific texture settings. |
GetSourceTextureWidthAndHeight | Gets the source texture's width and height. |
ReadTextureImportInstructions | 读取此 TextureImporter 的活动纹理输出指令。 |
ReadTextureSettings | 将纹理设置读入 TextureImporterSettings 类。 |
SetPlatformTextureSettings | Sets specific target platform settings. |
SetTextureSettings | Sets texture importers settings from TextureImporterSettings class. |
IsDefaultPlatformTextureFormatValid | Validates TextureImporterFormat based on the type of the current format (TextureImporterType) and the default platform. |
IsPlatformTextureFormatValid | Validates TextureImporterFormat based on a specified import type (TextureImporterType) and a specified build target (BuildTarget.). |
assetBundleName | 获取或设置 AssetBundle 名称。 |
assetBundleVariant | 获取或设置 AssetBundle 变体。 |
assetPath | 此导入器的资源的路径名称。(只读) |
importSettingsMissing | 如果导入的资源未随附任何元文件,则此值为 true。 |
userData | 获取或设置任意用户数据。 |
hideFlags | 该对象应该隐藏、随场景一起保存还是由用户修改? |
name | 对象的名称。 |
AddRemap | 将子资源从导入的资源(例如 FBX 文件)映射到同类型的外部资源。 |
GetExternalObjectMap | 获取 AssetImporter 使用的外部对象映射的副本。 |
RemoveRemap | 从外部对象的映射中删除项。 |
SaveAndReimport | 如果资源导入器已标记为“脏”,则保存资源导入器设置。 |
SetAssetBundleNameAndVariant | 设置 AssetBundle 名称和变体。 |
SupportsRemappedAssetType | 检查 AssetImporter 是否支持重新映射给定的资源类型。 |
GetInstanceID | Gets the instance ID of the object. |
ToString | 返回对象的名称。 |
GetAtPath | 在 path 处检索资源的资源导入器。 |
GetImportLog | Retrieves logs generated during the import of the asset at path. |
Destroy | 移除 GameObject、组件或资源。 |
DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
DontDestroyOnLoad | 在加载新的 Scene 时,请勿销毁 Object。 |
FindAnyObjectByType | Retrieves any active loaded object of Type type. |
FindFirstObjectByType | Retrieves the first active loaded object of Type type. |
FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
FindObjectsByType | Retrieves a list of all loaded objects of Type type. |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | 克隆 original 对象并返回克隆对象。 |
bool | 该对象是否存在? |
operator != | 比较两个对象是否引用不同的对象。 |
operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |