- Home /
Texture2D Copy help
this code possible "code 1"
code 1: Debug.Log(GetComponent().m_mapTexture.GetPixel(160, 120));
pictures[pictureCnt] = GameObject.Instantiate(GetComponent().m_mapTexture) as Texture2D;
this code not work "code 2"
code 2: pictures[rand] = GameObject.Instantiate(m_rgbTexture) as Texture2D;
textures same rgba data.
code 1 used setpixels and apply
code 2 used GetNativeTexturePtr and native plugin(DX9)
The "code2", all of the pixels represent the same value after copying. (A copy)
However, with the exception that you want to copy, "code2" functions very well.
Making the texture to GetNativeTexturePtr or would impossible a copy?
Comment