Version: 2018.2

Texture2D

class in UnityEngine

/

継承:Texture

マニュアルに切り替える

説明

テクスチャをハンドリングするクラスです。

その場でテクスチャを作成したり、既存の Texture アセット を変更するときに使います。

Static 変数

blackTextureすべて黒のピクセルで小さなテクスチャを取得します。
whiteTextureすべて白のピクセルで小さなテクスチャを取得します。

変数

alphaIsTransparencyIndicates 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.
desiredMipmapLevelThe mipmap level which would have been loaded by the streaming system before memory budgets are applied.
formatテクスチャのピクセルデータをフォーマットする
loadedMipmapLevelWhich mipmap level is currently loaded by the streaming system.
loadingMipmapLevelWhich mipmap level is in the process of being loaded by the mipmap streaming system.
mipmapCountテクスチャのミップマップレベル(読み取り専用)
requestedMipmapLevelThe mipmap level to load.
streamingMipmapsHas mipmap streaming been enabled for this texture.
streamingMipmapsPriorityRelative priority for this texture when reducing memory size in order to hit the memory budget.

コンストラクタ

Texture2D新規の空のテクスチャを作成します

Public 関数

Apply SetPixel 関数と SetPixels 関数による変更を適用します
ClearRequestedMipmapLevelResets the requestedMipmapLevel field.
CompressDXT 形式にテクスチャを圧縮します
GetPixel座標(x, y)のピクセルのカラーを取得します
GetPixelBilinear正規化座標(u, v)でフィルタリングされたピクセルのカラーを取得します
GetPixelsテクスチャからピクセル色を取得します。
GetPixels32Color32 形式のピクセルのカラー配列を取得します
GetRawTextureDataGet raw data from a texture for reading or writing.
IsRequestedMipmapLevelLoadedHas the mipmap level requested by setting requestedMipmapLevel finished loading?
LoadRawTextureDataRaw 形式データを読み取ってテクスチャのピクセルを格納します。
PackTexturesテクスチャアトラスに複数のテクスチャをパックします
ReadPixelsスクリーン画面からテクスチャデータへと保存するためのピクセルデータを読み込みます
Resizeテクスチャをリサイズします
SetPixel座標(x, y)のピクセルのカラーを設定します
SetPixelsピクセルカラー配列を設定します
SetPixels32ピクセルカラー配列を設定します
UpdateExternalTexture異なるネイティブのテクスチャオブジェクトを使うために Unity のテクスチャを更新します。

Static 関数

CreateExternalTexture外部で作成されたネイティブのテクスチャオブジェクトから Unity テクスチャを作成します。
GenerateAtlasPacks a set of rectangles into a square atlas, with optional padding between rectangles.

継承メンバー

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.
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つのオブジェクト参照が同じオブジェクトを参照しているか比較します。