2D テクスチャ配列を扱うクラス
Modern graphics APIs (e.g. D3D10 and later, OpenGL ES 3.0 and later, Metal etc.) support "texture arrays", which is an array of same size & format textures.
From the shader side, they are treated as a single resource, and sampling them needs an extra coordinate that indicates which array element to sample from.
一般的に、テクスチャ配列はテクスチャアトラスの代替えとして使われます。また、他の場合では、オブジェクトが 1 組の同サイズのテクスチャ (例えば、テレインなど) を使用するときなどに便利です。
Currently in Unity texture arrays do not have an import pipeline for them, and must be created from code, either at runtime or in editor scripts.
Using Graphics.CopyTexture is useful for fast copying of pixel data from regular 2D textures into elements of a texture array. From editor scripts,
a common way of creating serialized texture array is to create it, fill with data (either via Graphics.CopyTexture from regular 2D textures, or via SetPixels or
SetPixels32) and save it as an asset via AssetDatabase.CreateAsset.
すべてのプラットフォームと GPU がテクスチャ配列をサポートしているわけではないことに注意してください。例えば、Direct3D9 と OpenGL ES 2.0 はサポートしていません。SystemInfo.supports2DArrayTextures を使って確認できます。
allSlices | Read Only. This property is used as a parameter in some overloads of the CommandBuffer.Blit, Graphics.Blit, CommandBuffer.SetRenderTarget, and Graphics.SetRenderTarget methods to indicate that all texture array slices are bound. The value of this property is -1. |
depth | テクスチャ配列の要素の数 (読み込み専用) |
format | テクスチャ形式 (読み込み専用) |
isReadable | Returns true if this texture array is Read/Write Enabled; otherwise returns false. For dynamic textures created from script, always returns true. |
Texture2DArray | 新しいテクスチャ配列を作成 |
Apply | SetPixels で変更された設定をすべて適用します |
GetPixelData | Gets raw data from a Texture for reading or writing. |
GetPixels | 1 つの配列スライスのピクセルの色を返します。 |
GetPixels32 | 1 つの配列スライスのピクセルの色を返します。 |
SetPixelData | Set pixel values from raw preformatted data. |
SetPixels | 全体のミップレベルのピクセルの色を設定します。 |
SetPixels32 | 全体のミップレベルのピクセルの色を設定します。 |
allowThreadedTextureCreation | Allow texture creation to occur on any thread (rather than the dedicated render thread). |
currentTextureMemory | The amount of memory currently being used by the non-streaming and mipmap streaming textures combined. |
desiredTextureMemory | This amount of texture memory would be used before the texture streaming budget is applied. |
GenerateAllMips | Can be used with texture constructors that take a mip count to indicate that all mips should be generated. The value of this field is -1. |
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 | テクスチャのフィルタリングモード |
graphicsFormat | Returns the GraphicsFormat format or color format of a texture object. |
height | ピクセル単位でのテクスチャの高さ(読み取り専用) |
imageContentsHash | The hash value of the Texture. |
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 | The mipmap bias of the texture. |
mipmapCount | テクスチャのミップマップレベル(読み取り専用) |
updateCount | This counter is incremented when the texture is updated. |
width | ピクセル単位でのテクスチャの幅(読み取り専用) |
wrapMode | Texture coordinate wrapping mode. |
wrapModeU | Texture U coordinate wrapping mode. |
wrapModeV | Texture V coordinate wrapping mode. |
wrapModeW | Texture W coordinate wrapping mode for Texture3D. |
GetInstanceID | オブジェクトのインスタンス ID を返します |
ToString | Returns the name of the object. |
GetNativeTexturePtr | テクスチャリソースへのネイティブ (グラフィックス API に内在する) ポインターを取得します。 |
IncrementUpdateCount | Increment the update counter. |
Destroy | Removes a GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindObjectOfType | タイプ type から最初に見つけたアクティブのオブジェクトを返します |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | original のオブジェクトをクローンします |
SetGlobalAnisotropicFilteringLimits | 異方性のリミットを設定します |
SetStreamingTextureMaterialDebugProperties | Uploads additional debug information to materials using textures set to stream mipmaps. |
bool | オブジェクトが存在するかどうか |
operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
operator == | 2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。 |