纹理导入器允许您从编辑器脚本修改 Texture2D 导入设置。
此类中的设置与 Texture Import Settings 中显示的设置相匹配。
| allowAlphaSplitting | 允许在相关平台上对此纹理进行 Alpha 通道分离。 |
| alphaIsTransparency | 如果提供的 Alpha 通道为透明度 (Transparency),则启用此属性可预过滤颜色,从而避免过滤瑕疵。 |
| alphaSource | 选择生成导入纹理的 Alpha 的方式。 |
| alphaTestReferenceValue | 返回或分配 Alpha 测试参考值。 |
| androidETC2FallbackOverride | 不支持 ETC2 的 Android 设备上的 ETC2 纹理解压缩回退重载。 |
| anisoLevel | 纹理的各向异性过滤级别。 |
| borderMipmap | Keeps texture borders the same when generating mipmaps. |
| compressionQuality | 纹理压缩质量,范围为 [0..100]。 |
| convertToNormalmap | Convert heightmap to normal map |
| crunchedCompression | 使用经过 Crunch 处理的压缩(如果可用)。 |
| fadeout | Fade out mip levels to gray color. |
| filterMode | 纹理的过滤模式。 |
| generateCubemap | 立方体贴图生成模式。 |
| heightmapScale | 高度贴图中的凹凸程度。 |
| ignorePngGamma | Ignore the Gamma attribute in PNG files. This property does not effect other file formats. |
| isReadable | 如果希望从脚本中读取纹理数据,请将此属性设置为 true。将其设置为 false 可阻止脚本读取纹理数据。 |
| maxTextureSize | 最大纹理大小。 |
| mipMapBias | 纹理的多级渐进纹理偏差。 |
| mipmapEnabled | 生成 MipMap。 |
| mipmapFadeDistanceEnd | 纹理完全淡出的 Mip 级别。 |
| mipmapFadeDistanceStart | 纹理开始淡出的 Mip 级别。 |
| mipmapFilter | Mipmap 过滤模式。 |
| mipMapsPreserveCoverage | Enables or disables coverage-preserving alpha mipmapping. |
| normalmapFilter | 法线贴图过滤模式。 |
| npotScale | 非二次幂纹理的缩放模式。 |
| qualifiesForSpritePacking | 如果为精灵打包设置了此 TextureImporter,则返回 true。 |
| secondarySpriteTextures | 用于导入的精灵的辅助纹理。 |
| spriteBorder | 生成的精灵的边框大小。 |
| spriteImportMode | 为精灵纹理选择 Single 或 Manual 导入模式。 |
| spritePackingTag | 选择 Sprite 打包标签。 |
| spritePivot | 精灵对象坐标空间中图形所在的点。 |
| spritePixelsPerUnit | 对应世界空间中一个单位的精灵中的像素数。 |
| spritesheet | 用于表示与各精灵图形对应的图集部分的数组。 |
| sRGBTexture | Determines whether this texture stores color data. |
| streamingMipmaps | 为此纹理启用 Mipmap 串流。 |
| streamingMipmapsPriority | 在减小内存大小以达到内存预算时此纹理的相对优先级。 |
| 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 | 清除特定的目标平台设置。 |
| DoesSourceTextureHaveAlpha | Allows you to check whether the texture source image has an alpha channel. |
| GetAutomaticFormat | 返回将为此平台自动选择的 TextureImporterFormat。 |
| GetDefaultPlatformTextureSettings | 获取特定于平台的默认纹理设置。 |
| GetPlatformTextureSettings | 获取特定于平台的纹理设置。 |
| GetSourceTextureWidthAndHeight | Gets the source texture's width and height. |
| ReadTextureImportInstructions | 读取此 TextureImporter 的活动纹理输出指令。 |
| ReadTextureSettings | 将纹理设置读入 TextureImporterSettings 类。 |
| SetPlatformTextureSettings | 设置特定的目标平台设置。 |
| SetTextureSettings | 从 TextureImporterSettings 类中设置纹理导入器设置。 |
| 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 处检索资源的资源导入器。 |
| Destroy | 移除 GameObject、组件或资源。 |
| DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
| DontDestroyOnLoad | 在加载新的 Scene 时,请勿销毁 Object。 |
| FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
| FindObjectsOfType | Gets a list of all loaded objects of Type type. |
| Instantiate | 克隆 original 对象并返回克隆对象。 |
| bool | 该对象是否存在? |
| operator != | 比较两个对象是否引用不同的对象。 |
| operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |