Hi. We are facing an issue with Unity. We are
developing an IPAD app. One feature is to take a screenshot and use it for
a button. Everything works fine on the MAC, but because the tree directory
in the IPAD where it doesn’t exist a Resources folder, we can’t use
“Resources.Load”. We have tried several solutions, like creating in the
IPAD a Resources folder (inside the Documents folder) and trying to load
the texture from it, or even this piece of code:
public Texture LoadTextureFromFile(string filename)
{
Texture2D texture = new Texture2D(1024, 768);
FileStream fs = new FileStream(filename, FileMode.Open,
FileAccess.Read);
byte[] imageData = new byte[fs.Length];
fs.Read(imageData, 0, (int)fs.Length);
texture.LoadImage(imageData);
return (texture as Texture);
}
Any help would be greatly appreciated. We’ve been stuck with this issue for
several days
Please share your code? I'm having the same issue
– oliver-jones