お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closeピクセルカラーの配列を取得します
この関数はテクスチャのミップレベル全体のピクセルカラーの
配列を返します。
返される配列は平らな2次元配列で、ピクセルは上から下(列の後に列)、左から右に並びます。
配列のサイズが使用されるミップレベルの高さと幅になります。
デフォルトのミップレベルが今のテクスチャのサイズのみである場合は0(ベーステクスチャ)です。
一般的な場合、未ップレベルは mipWidth=max(1,width>>miplevel)
と高さも同様です。
Using GetPixels
can be faster than calling GetPixel repeatedly, especially
for large textures. In addition, GetPixels
can access individual mipmap levels.
ピクセルカラーの配列を取得します
This function is an extended version of GetPixels
above; it does not return the whole
mip level but only blockWidth
by blockHeight
region starting at x,y.
The block must fit into the used mip level. The returned array is blockWidth*blockHeight size.