bool TextureHasMipmaps(Texture texture)
{
var crt = texture as CustomRenderTexture;
else if (crt is CustomRenderTexture)
return ((CustomRenderTexture)texture).useMipMap;
else if (texture is RenderTexture)
return ((RenderTexture)texture).useMipMap;
return false;
}