Created
September 2, 2022 20:12
-
-
Save ratozumbi/74d33695f68a684bbc00383244ac44cf to your computer and use it in GitHub Desktop.
Check valid TextureFormat for current platform Unity3D C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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