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. Because the tree directory in the IPAD where it doesn't exist a Resources folder, we can't use "Resources.Load", and even so, because how this feature must work, the texture won't be available at the beginning, so we can't put it initially in the Resources folder. 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