Version: 2018.4

CubemapArray

class in UnityEngine

/

継承:Texture

マニュアルに切り替える

説明

Class for handling Cubemap arrays.

Modern graphics APIs (e.g. D3D10.1 and later, OpenGL 4.0 and later, Metal on macOS, PS4) support "cubemap arrays", which are arrays of same size & format cubemaps. 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.

Typically cubemap arrays are useful for implementing efficient reflection probe, lighting and shadowing systems (all reflection/cookie/shadow cubemaps in a single array).

Cubemap 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 Cubemap textures into elements of a cubemap array. From editor scripts, a common way of creating serialized cubemap array is to create it, fill with data (either via Graphics.CopyTexture from regular cubemaps, or via SetPixels or SetPixels32) and save it as an asset via AssetDatabase.CreateAsset.

Note that not all platforms and GPUs support cubemap arrays; for example none of the mobile APIs/GPUs currently support them. Use SystemInfo.supportsCubemapArrayTextures to check.

変数

cubemapCountNumber of cubemaps in the array (Read Only).
formatテクスチャ形式 (読み込み専用)

コンストラクタ

CubemapArrayCreate a new cubemap array.

Public 関数

Apply SetPixels で変更された設定をすべて適用します
GetPixelsReturns pixel colors of a single array slice/face.
GetPixels32Returns pixel colors of a single array slice/face.
SetPixelsSet pixel colors for a single array slice/face.
SetPixels32Set pixel colors for a single array slice/face.

継承メンバー

Static 変数

currentTextureMemoryThe amount of memory currently being used by textures.
desiredTextureMemoryThis amount of texture memory would be used before the texture streaming budget is applied.
nonStreamingTextureCountNumber of non-streaming textures.
nonStreamingTextureMemoryTotal amount of memory being used by non-streaming textures.
streamingMipmapUploadCountHow many times has a texture been uploaded due to texture mipmap streaming.
streamingRendererCountNumber of renderers registered with the texture streaming system.
streamingTextureCountNumber of streaming textures.
streamingTextureDiscardUnusedMipsForce the streaming texture system to discard all unused mipmaps immediately, rather than caching them until the texture memory budget is exceeded.
streamingTextureForceLoadAllForce streaming textures to load all mipmap levels.
streamingTextureLoadingCountNumber of streaming textures with mipmaps currently loading.
streamingTexturePendingLoadCountNumber of streaming textures with outstanding mipmaps to be loaded.
targetTextureMemoryThe amount of memory used by textures after the mipmap streaming and budget are applied and loading is complete.
totalTextureMemoryThe total amount of memory that would be used by all textures at mipmap level 0.

変数

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名
anisoLevelテクスチャの異方性フィルタリングのレベル
dimensionテクスチャの次元 (タイプ)。読み取り専用。
filterModeテクスチャのフィルタリングモード
heightピクセル単位でのテクスチャの高さ(読み取り専用)
imageContentsHashThe hash value of the Texture.
isReadableReturns 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ミップマップのバイアス
updateCountThis counter is incremented when the texture is updated.
widthピクセル単位でのテクスチャの幅(読み取り専用)
wrapModeTexture coordinate wrapping mode.
wrapModeUTexture U coordinate wrapping mode.
wrapModeVTexture V coordinate wrapping mode.
wrapModeWTexture W coordinate wrapping mode for Texture3D.

Public 関数

GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringReturns the name of the GameObject.
GetNativeTexturePtrテクスチャリソースへのネイティブ (グラフィックス API に内在する) ポインターを取得します。
IncrementUpdateCountIncrement the update counter.

Static 関数

Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします
SetGlobalAnisotropicFilteringLimits異方性のリミットを設定します
SetStreamingTextureMaterialDebugPropertiesUploads additional debug information to materials using textures set to stream mip maps.

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。