This line takes about 1 minute to render a file from a procedural Texture2D? must i specify a format/size or something to make the function faster?
System.IO.File.WriteAllBytes("picture56.png", texture1.EncodeToPNG());
This line takes about 1 minute to render a file from a procedural Texture2D? must i specify a format/size or something to make the function faster?
System.IO.File.WriteAllBytes("picture56.png", texture1.EncodeToPNG());
Find out:
using System;
using System.IO;
///... blah blah blah
Debug.Log(string.Format("Timestamp: {0} - About to start byte conversion", DateTime.Now.ToString());
byte[] pngbytes = texture1.EncodeToPNG();
Debug.Log(string.Format("Timestamp: {0} - Done converting to bytes", DateTime.Now.ToString());
Debug.Log(string.Format("Timestamp: {0} - About to start writing bytes to perm storage.", DateTime.Now.ToString());
File.WriteAllBytes("picture56.png", pngbytes);
Debug.Log(string.Format("Timestamp: {0} - DONE! writing bytes to perm storage.", DateTime.Now.ToString());