UnityEngine.Graphics.CopyTexture C# (CSharp) Method

CopyTexture() public static method

Copy texture contents.

public static CopyTexture ( Texture src, int srcElement, int srcMip, Texture dst, int dstElement, int dstMip ) : 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.
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.
return void
        public static void CopyTexture(Texture src, int srcElement, int srcMip, Texture dst, int dstElement, int dstMip)
        {
            CopyTexture_Slice(src, srcElement, srcMip, dst, dstElement, dstMip);
        }

Same methods

Graphics::CopyTexture ( Texture src, Texture dst ) : void
Graphics::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

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