internal static void ValidateFormat(Texture src, GraphicsFormat dstformat) { GraphicsFormat srcformat = GraphicsFormatUtility.GetFormat(src); if (!SystemInfo.IsFormatSupported(srcformat, FormatUsage.ReadPixels)) { Debug.LogError(String.Format("'{0}' doesn't support ReadPixels usage on this platform. Async GPU readback failed.", srcformat)); } }
public override string GetInfoString() { Texture t = target as Texture; string info = t.width + "x" + t.height; GraphicsFormat format = GraphicsFormatUtility.GetFormat(t); info += " " + GraphicsFormatUtility.GetFormatString(format); return(info); }
public override string GetInfoString() { if (m_PreviewTextures != null && m_PreviewPage < m_PreviewTextures.Length) { Texture2D t = m_PreviewTextures[m_PreviewPage]; GraphicsFormat format = GraphicsFormatUtility.GetFormat(t); return(string.Format("{0}x{1} {2}\n{3}", t.width, t.height, GraphicsFormatUtility.GetFormatString(format), EditorUtility.FormatBytes(TextureUtil.GetStorageMemorySizeLong(t)))); } return(""); }