Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Feb 10, 2022
1 parent 8a912c1 commit 1cef675
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ bool IsJpeg(string filename)
if (EditorUtility.IsPersistent(obj))
{
var texturePath = AssetDatabase.GetAssetPath(obj);
importer = TextureImporter.GetAtPath(texturePath) as T;
importer = AssetImporter.GetAtPath(texturePath) as T;
return importer;
}
importer = null;
Expand Down Expand Up @@ -2372,13 +2372,15 @@ private ImageId ExportImageInternalBuffer(UnityEngine.Texture texture, TextureMa
#if UNITY_EDITOR
if (textureMapType == TextureMapType.Custom_Unknown)
{
#if UNITY_EDITOR
if (TryGetImporter<TextureImporter>(texture, out var importer))
{
if (!importer.sRGBTexture)
sRGB = false;
else
sRGB = true;
}
#endif
}
#endif

Expand Down

0 comments on commit 1cef675

Please sign in to comment.