- Home /
Web player file access
Hello everyone. The question is pretty simple but I didnt manage to find the answer.
Im building a web app(means using Web Player build) that will take images from the folder on the hard drive and use them as textures on prefab-generated primitives in program.
Files are accesed via file:// protocol using WWW function and are in the subfolder of where the player is.
The problems is - everything works when I run it in the game mode in editor but when building to a web player, the app cant find textures. Are there any restrictions for web player file access or something?
Answer by rutter · Mar 30, 2012 at 03:08 AM
http://answers.unity3d.com/questions/52875/file-manipulations-in-the-unity-web-player.html
http://unity3d.com/support/documentation/Manual/Security%20Sandbox.html
Yeah, I saw that, thanks, but its said that file:// protocol is accessible in web player.
The funny thing is - in web player logs I can see WWW actually fetching the file but my yield function doesn't work and thats why the texture can't be applied to my primitives. Yielding works fine in editor play mode.
its said that file:// protocol is accessible in web player.
No it doesn't. You can use file:// in the WWW class, but that has nothing to do with the web player, which can't access local files at all, including the use of file://. You can only access documents on the web when using the web player.
Thanks for your time. I must have misread something in docs.
Your answer
Follow this Question
Related Questions
Unity 3.1 Webplayer: access method failed 1 Answer
accessing sub directory perhaps an crossdomain error 1 Answer
Problems with webplayer in chrome on OSX 2 Answers
WWW requests are exponentially slow on large web pages (xml) 1 Answer
WebPlayer WWW Authorization always prompts for credentials 0 Answers