用于纹理处理的类。
使用该类可以即时创建纹理或修改现有的texture assets。
blackTexture | 获取一个全部为黑色像素的小纹理。 |
whiteTexture | 获取一个全部为白色像素的小纹理。 |
alphaIsTransparency | Indicates whether this texture was imported with TextureImporter.alphaIsTransparency enabled. This setting is available only in the Editor scripts. Note that changing this setting will have no effect; it must be enabled in TextureImporter instead. |
desiredMipmapLevel | The mipmap level which would have been loaded by the streaming system before memory budgets are applied. |
format | 纹理中像素数据的格式(只读)。 |
isReadable | Returns true if the Read/Write Enabled checkbox was checked when the texture was imported; otherwise returns false. For a dynamic Texture created from script, always returns true. For additional information, see TextureImporter.isReadable. |
loadedMipmapLevel | Which mipmap level is currently loaded by the streaming system. |
loadingMipmapLevel | Which mipmap level is in the process of being loaded by the mipmap streaming system. |
mipmapCount | 该纹理中有多少个多级渐进纹理级别(只读)。 |
requestedMipmapLevel | The mipmap level to load. |
streamingMipmaps | Has mipmap streaming been enabled for this texture. |
streamingMipmapsPriority | Relative priority for this texture when reducing memory size in order to hit the memory budget. |
Texture2D | 创建一个新的空纹理。 |
Apply | 实际应用任何先前的 SetPixel 和 SetPixels 更改。 |
ClearRequestedMipmapLevel | Resets the requestedMipmapLevel field. |
Compress | 将纹理压缩为 DXT 格式。 |
GetPixel | 返回坐标 (x, y) 上的像素颜色。 |
GetPixelBilinear | 返回标准化坐标 (u, v) 处已过滤的像素颜色。 |
GetPixels | 从纹理中获取像素颜色。 |
GetPixels32 | 获取像素颜色块(Color32 格式)。 |
GetRawTextureData | Get raw data from a texture for reading or writing. |
IsRequestedMipmapLevelLoaded | Has the mipmap level requested by setting requestedMipmapLevel finished loading? |
LoadRawTextureData | 使用原始预格式化数据填充纹理像素。 |
PackTextures | 将多个纹理打包到一个纹理图集中。 |
ReadPixels | 将屏幕像素读取到保存的纹理数据中。 |
Resize | 调整纹理大小。 |
SetPixel | 设置坐标 (x,y) 处的像素颜色。 |
SetPixels | 设置像素颜色块。 |
SetPixels32 | 设置像素颜色块。 |
UpdateExternalTexture | 更新 Unity 纹理以使用不同的原生纹理对象。 |
CreateExternalTexture | 基于外部创建的原生纹理对象创建一个 Unity 纹理。 |
GenerateAtlas | 将一组矩形打包成一个方形图集,并且可以选择在矩形之间进行填充。 |
currentTextureMemory | The amount of memory currently being used by textures. |
desiredTextureMemory | This amount of texture memory would be used before the texture streaming budget is applied. |
nonStreamingTextureCount | Number of non-streaming textures. |
nonStreamingTextureMemory | Total amount of memory being used by non-streaming textures. |
streamingMipmapUploadCount | How many times has a texture been uploaded due to texture mipmap streaming. |
streamingRendererCount | Number of renderers registered with the texture streaming system. |
streamingTextureCount | Number of streaming textures. |
streamingTextureDiscardUnusedMips | Force the streaming texture system to discard all unused mipmaps immediately, rather than caching them until the texture memory budget is exceeded. |
streamingTextureForceLoadAll | Force streaming textures to load all mipmap levels. |
streamingTextureLoadingCount | Number of streaming textures with mipmaps currently loading. |
streamingTexturePendingLoadCount | Number of streaming textures with outstanding mipmaps to be loaded. |
targetTextureMemory | The amount of memory used by textures after the mipmap streaming and budget are applied and loading is complete. |
totalTextureMemory | The total amount of memory that would be used by all textures at mipmap level 0. |
hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
name | 对象的名称。 |
anisoLevel | 纹理的各向异性过滤级别。 |
dimension | 纹理的维度(类型)(只读)。 |
filterMode | 纹理的过滤模式。 |
height | 纹理的高度(以像素为单位)。(只读) |
imageContentsHash | 纹理的哈希值。 |
isReadable | Returns true if the Read/Write Enabled checkbox was checked when the texture was imported; otherwise returns false. For a dynamic Texture created from script, always returns true. For additional information, see TextureImporter.isReadable. |
mipMapBias | 纹理的多级渐进纹理偏差。 |
updateCount | 更新纹理时,此计数器会递增。 |
width | 纹理的宽度(以像素为单位)。(只读) |
wrapMode | 纹理坐标换行模式。 |
wrapModeU | 纹理 U 坐标换行模式。 |
wrapModeV | 纹理 V 坐标换行模式。 |
wrapModeW | Texture3D 的纹理 W 坐标换行模式。 |
GetInstanceID | 返回对象的实例 ID。 |
ToString | 返回 GameObject 的名称。 |
GetNativeTexturePtr | 获取指向纹理资源的原生(底层图形 API)指针。 |
IncrementUpdateCount | 递增更新计数器。 |
Destroy | 删除 GameObject、组件或资源。 |
DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
FindObjectsOfType | 返回所有类型为 type 的已加载的激活对象的列表。 |
Instantiate | 克隆 original 对象并返回克隆对象。 |
SetGlobalAnisotropicFilteringLimits | 设置各向异性限制。 |
SetStreamingTextureMaterialDebugProperties | Uploads additional debug information to materials using textures set to stream mip maps. |
bool | 该对象是否存在? |
operator != | 比较两个对象是否引用不同的对象。 |
operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |