UnityEngine.Graphics.CopyTexture C# (CSharp) Method

CopyTexture() public static method

Copy texture contents.

public static CopyTexture ( Texture src, int srcElement, int srcMip, int srcX, int srcY, int srcWidth, int srcHeight, Texture dst, int dstElement, int dstMip, int dstX, int dstY ) : void
src Texture Source texture.
srcElement int Source texture element (cubemap face, texture array layer or 3D texture depth slice).
srcMip int Source texture mipmap level.
srcX int X coordinate of source texture region to copy (left side is zero).
srcY int Y coordinate of source texture region to copy (bottom is zero).
srcWidth int Width of source texture region to copy.
srcHeight int Height of source texture region to copy.
dst Texture Destination texture.
dstElement int Destination texture element (cubemap face, texture array layer or 3D texture depth slice).
dstMip int Destination texture mipmap level.
dstX int X coordinate of where to copy region in destination texture (left side is zero).
dstY int Y coordinate of where to copy region in destination texture (bottom is zero).
return void
        public static void CopyTexture(Texture src, int srcElement, int srcMip, int srcX, int srcY, int srcWidth, int srcHeight, Texture dst, int dstElement, int dstMip, int dstX, int dstY)
        {
            CopyTexture_Region(src, srcElement, srcMip, srcX, srcY, srcWidth, srcHeight, dst, dstElement, dstMip, dstX, dstY);
        }

Same methods

Graphics::CopyTexture ( Texture src, Texture dst ) : void
Graphics::CopyTexture ( Texture src, int srcElement, int srcMip, Texture dst, int dstElement, int dstMip ) : void

Usage Example

コード例 #1
0
ファイル: PictureHandle.cs プロジェクト: mmuu1987/MyTouchWall
    private void HandleTextureArry(List <Texture2D> texs)
    {
        if (texs == null || texs.Count == 0)
        {
            enabled = false;
            return;
        }

        if (SystemInfo.copyTextureSupport == CopyTextureSupport.None ||
            !SystemInfo.supports2DArrayTextures)
        {
            enabled = false;
            return;
        }
        TexArr = new Texture2DArray(texs[0].width, texs[0].width, texs.Count, TextureFormat.RGBA32, false, false);

        for (int i = 0; i < texs.Count; i++)
        {
            //Debug.Log(" index is" + i);
            try
            {
                Graphics.CopyTexture(texs[i], 0, 0, TexArr, i, 0);
            }
            catch (Exception e)
            {
                Debug.Log("index is" + i);
                throw e;
            }
        }

        TexArr.wrapMode   = TextureWrapMode.Clamp;
        TexArr.filterMode = FilterMode.Bilinear;

        Debug.Log("HandleTextureArry End ===============>>>>>>>>>>>   TexArr Length is " + TexArr.depth);
    }
All Usage Examples Of UnityEngine.Graphics::CopyTexture