Hey people! I was trying to export a texture that I made to png, but all I got was a question mark as the actual image. I do not get what I am doing wrong, and I have found nothing on the internet about this issue. Anyway, here is my code.
`
Texture2D tex = new Texture2D(1, 1);
tex.LoadImage(Encoding.ASCII.GetBytes(File.ReadAllText(n)));
File.WriteAllBytes("stuff.png", tex.EncodeToPNG());
`
The variable n refers to a png image path, which IS existing. Also, this code probably looks a bit weird because I am importing and exporting the same png image, but this is just some code that I am trying to get working.