UnityEngine.Graphics.CopyTexture C# (CSharp) Method

CopyTexture() public static method

Copy texture contents.

public static CopyTexture ( Texture src, Texture dst ) : void
src Texture Source texture.
dst Texture Destination texture.
return void
        public static void CopyTexture(Texture src, Texture dst)
        {
            CopyTexture_Full(src, dst);
        }

Same methods

Graphics::CopyTexture ( Texture src, int srcElement, int srcMip, Texture dst, int dstElement, int dstMip ) : 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