Skip to content

Instantly share code, notes, and snippets.

@ratozumbi
Created September 2, 2022 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ratozumbi/74d33695f68a684bbc00383244ac44cf to your computer and use it in GitHub Desktop.
Save ratozumbi/74d33695f68a684bbc00383244ac44cf to your computer and use it in GitHub Desktop.
Check valid TextureFormat for current platform Unity3D C#
var types = Enum.GetValues(typeof(TextureFormat));
try
{
foreach (var type in types)
{
if(SystemInfo.SupportsTextureFormat((TextureFormat)type))
Debug.Log(Enum.GetName(typeof(TextureFormat),type));
}
}
catch (Exception EX_NAME)
{
Debug.Log(EX_NAME);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment