I'm using Unity 2019 and I made a script that load a texture from the pc with "UnityWebRequest".
using (UnityWebRequest uwr = UnityWebRequestTexture.GetTexture(finalPath))
{
yield return uwr.SendWebRequest();
if (uwr.isNetworkError || uwr.isHttpError)
{
Debug.Log(uwr.error);
}
else
{
// Get downloaded asset bundle
horizImg.gameObject.SetActive(true);
horizImg.texture = DownloadHandlerTexture.GetContent(uwr);
}
}
If finalpath has a space or a "+" in the name it works well, but if "finalPath" has both ("+" and a space") it returns this error:
HTTP/1.1 404 Not Found