I’m simply trying to take a screenshot then load it in a byte array, but I get this error:
error CS0117: 'System.IO.File' does not contain a definition for 'ReadAllBytes'
any workarounds to make it work on mac too ?
my code is as simple as this:
Application.CaptureScreenshot("menu.png");
byte[] data = File.ReadAllBytes("menu.png");
bgImage.LoadImage(data);
note - bgImage is a Texture2D.