Hey guys anyone know how to access a local file? say a texture, a text file, a video, etc. I know the www class does these things for remote files but what about local files?
prepend file:// when using the WWW class or use .NET's System.IO classes. (File access is disabled in the web player of course)
Nice that makes things simple, is there a way to know from code if I´m running a web player or a standalone?
I tried loading a local texture and it did work, however if I put that texture in a folder, it stops working. var www : WWW = new WWW ("file://C2logo.png"); this one works if C2logo is in the same folder as assets, library and temp(ie root project folder). var www : WWW = new WWW ("file://a/C2logo.png"); If I move C2Logo to a folder named "a" inside the same folder as assets, library and temp, it does not work. Any ideas?
Just from having been making websites since I was about 12, I assume if you place a file anywhere other than in the folder you are working from, you need to supply the exact location of the file. Such as: file:///Applications/Unity/FolderThatWasCreated/file.png