I load images from my local destination to unity the code is:
Texture2D imgTexture;
using (UnityWebRequest req = UnityWebRequestTexture.GetTexture(filePath))
{
yield return req.SendWebRequest();
if (req.isNetworkError)
{
Debug.Log(req.error);
}
else
{
imgTexture = DownloadHandlerTexture.GetContent(req);
}
}
it works on pc but when I run on android emulator I get an error
Cannot connect to destination host
the local file directory comes from simple file browsing plugin so I am thinking directory cannot be wrong. is it a permission problem how can I fix this?