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);
}