- Home /
How to load file from local NAS ( Windows and Android )
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));
I also tried file:///\\sebkkun-nas/mcp_files/TestFichier.txt file://\\192.168.1.30/mcp_files/TestFichier.txt file://192.168.1.30/mcp_files/TestFichier.txt
Did you find a solution? Are network paths are not supported by Unity on Android ?
Your answer
Follow this Question
Related Questions
OBB. How I can access files in OBB? 0 Answers
Engine pauses/hangs when getting files via WWW 0 Answers
Emulate Latency on WWW 1 Answer
WWW and File.Exists to check new file on server 1 Answer
All file in folder from database 0 Answers