We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8239c1 commit 8763e5cCopy full SHA for 8763e5c
1 file changed
RuntimeUnityEditor/Utils/TextureUtils.cs
@@ -54,7 +54,7 @@ public static byte[] BasedEncodeToPNG(this Texture tex)
54
var t = Type.GetType("UnityEngine.ImageConversion, UnityEngine.ImageConversionModule", false);
55
var m2 = t?.GetMethod("EncodeToPNG", BindingFlags.Static | BindingFlags.Public);
56
if (m2 != null)
57
- return (byte[])m2.Invoke(t2d, new object[0]);
+ return (byte[])m2.Invoke(null, new object[] { t2d });
58
59
throw new Exception("Could not find method EncodeToPNG, can't save to file.");
60
}
0 commit comments