Unity convert png to sprite. Scripting api editorgui drawpreviewtexture
If mat is null (the default), an appropriate material will be chosen for a RGBM or doubleLDR lightmap or a normal map and the fallback blit material will be .... Scripting api editorgui drawpreviewtexture