Hello
I try to read files from a my NAS.
In my configuration, i have a shared folder on a Nas at @ \sebkkun-nas/mcp_files.
A mapped a network drive on it on R:\ ( for test purpose )
using chrome I can access file:///sebkkun-nas/mcp_files/TestFichier.txt, so URL is cocrect.
But it doesn’t work in Unity.
file:///R:/TestFichier.txt : works in unity
https://upload.wikimedia.org/wikipedia/hu/8/8c/Krillin_dragon_ball_anime.png, also works.
What am I missing ?
My code :
IEnumerator WaitForRequest(WWW www)
{
yield return www;
if (www.error == null)
Debug.Log("WWW Ok!: " + www.text);
else
Debug.Log("WWW Error: " + www.error);
}
void Start ()
{
string url;
url = "file:///sebkkun-nas/mcp_files/TestFichier.txt"; // Does NOT WORK
url = "file:///R:/TestFichier.txt"; // OK
url = "https://upload.wikimedia.org/wikipedia/hu/8/8c/Krillin_dragon_ball_anime.png"; // OK
var myFile = new WWW(url);
StartCoroutine(WaitForRequest(myFile));