TextureImporter
- anisoLevel
- borderMipmap
- ClearPlatformTextureSettings
- convertToNormalmap
- correctGamma
- DoesSourceTextureHaveAlpha
- fadeout
- filterMode
- generateCubemap
- GetPlatformTextureSettings
- grayscaleToAlpha
- heightmapScale
- isReadable
- lightmap
- maxTextureSize
- mipMapBias
- mipmapEnabled
- mipmapFadeDistanceEnd
- mipmapFadeDistanceStart
- mipmapFilter
- normalmapFilter
- normalmap
- npotScale
- ReadTextureSettings
- SetPlatformTextureSettings
- SetTextureSettings
- textureFormat
- textureType
- wrapMode
TextureImporter 纹理导入器
Inherits from AssetImporter
Texture importer lets you modify Texture2D import settings from editor scripts.
TextureImporter让你从编辑器脚本修改Texture2D导入设置。
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
注意:这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。
Settings of this class match the ones exposed in Texture Import Settings.
这个类的设置匹配暴露在Texture Import检视面板中的设置。
Variables变量
-
Format of imported texture.
被导入纹理的格式。 -
Maximum texture size.
最大纹理大小。 -
Generate alpha channel from intensity?
从灰度生成alpha通道? -
Cubemap generation mode.
立方图生成模式。 -
Scaling mode for non power of two textures.
用于非二次幂纹理的缩放模式。 -
Is texture data readable from scripts.
纹理数据从脚本是否可读? -
Generate mip maps for the texture?
用于纹理,生成mipmap? -
Keep texture borders the same when generating mipmaps?
当生成mipmap时,保持纹理边框相同? -
Should mip maps be generated with gamma correction?
应否生成mipmap带有伽玛校正? -
Mipmap filtering mode.
Mipmap过滤模式。 -
Fade out mip levels to gray color?
淡出mip级别到灰色? -
Mip level where texture begins to fade out.
Mip级别,在哪里纹理开始淡出。 -
Mip level where texture is faded out completely.
Mip级别,在哪里纹理完全淡出。 -
Convert heightmap to normal map?
转换高度图到法线贴图? -
Is this texture a normal map?
转换高度图到法线贴图? -
Normal map filtering mode.
法线贴图过滤模式。 -
Amount of bumpyness in the heightmap.
高度图中的凹凸数。 -
Is this texture a lightmap?
这个纹理是光照贴图么? -
Anisotropic filtering level of the texture.
纹理的各向异性过滤等级。 -
Filtering mode of the texture.
纹理的过滤模式。 -
Wrap mode (Repeat or Clamp) of the texture.
纹理的循环模式。 -
Mip map bias of the texture.
纹理的Mip map偏移值。 -
Which type of texture are we dealing with here
在这里处理,纹理是哪种类型。
Functions函数
-
Get platform specific texture settings
获取平台特定的纹理设置。 -
Set specific target platform settings
设置特定目标平台纹理设置。 -
Clear specific target platform settings
清除特定目标平台纹理设置。 -
Does textures source image have alpha channel.
源纹理的图像是否有alpha通道。 -
Read texture settings into TextureImporterSettings class.
在TextureImporterSettings类读取纹理设置。 -
Set texture importers settings from TextureImporterSettings class.
从TextureImporterSettings类,设置纹理导入设置。
Inherited members继承成员
Inherited Variables继承变量
-
The path name of the asset for this importer (Read Only)
用于这个导入器,资源的路径名(只读)。
-
The name of the object. //物体的名字
-
Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
-
Returns the instance id of the object.
返回物体的实例ID -
Returns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions继承类函数
-
Retrieves the asset importer for the asset at path.
为所在路径的资源,导入器重新获取资源。
-
Does the object exist?
物体是否存在? -
Clones the object original and returns the clone.
克隆原始物体,并返回克隆的物体 -
-
Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源 -
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 -
Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 -
Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 -
Compares if two objects refer to the same
比较如果两个物体相同 -
Compares if two objects refer to a different object
比较如果两个物体不同 -
Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。
最后修改:2011年5月27日 Friday 9:54