Version: 2017.1

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.

継承メンバー

変数

hideFlagsオブジェクトは非表示、シーンに保存、ユーザーが編集可能、などを設定する。
nameオブジェクト名
anisoLevelテクスチャの異方性フィルタリングのレベル
dimensionテクスチャの次元 (タイプ)。読み取り専用。
filterModeテクスチャのフィルタリングモード
heightピクセル単位でのテクスチャの高さ(読み取り専用)
mipMapBiasミップマップのバイアス
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 を返します
ToStringゲームオブジェクトの名前を返します
GetNativeTexturePtrテクスチャリソースへのネイティブ (グラフィックス API に内在する) ポインターを取得します。

Static 関数

Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoad新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします
SetGlobalAnisotropicFilteringLimits異方性のリミットを設定します

Operator

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