- Home /
Why doesn't the Web Player load from my website?
Hello everyone,
I am using the free version of Unity4 to build a Web Player for a very simple project that I put together. Everything works fine locally on a Mac as well as on a Windows environment.
However, after I upload the Web Player files on my website and I click on the link http://www.donimation.com/Unity/TestBuilds/TestBuild003/TestBuild003.html the Default WebPlayer comes up just fine but the loading bar does not appear to load anything.
I did a similar test with the AngryBots demo last week and posted my concerns on Unity Forums. http://forum.unity3d.com/threads/169978-Loading-issue-with-Web-Player-build-on-my-FTP-%28Noob%29#post1161992 I apologize for posting the same (more or less) issue again on Unity Answers, but after not receiving any feedback, I decided to try this again just in case there was some sort of copyright limitation with the demo project I was using.
The results are the same...
Could this be some sort of limitation with the free version? I am rather new at this so I suspect/hope that the answer is a fairly simple one. Thanks in advance for any sort of feedback anyone might be able to provide me with.
Best regards,
Don
Answer by donimation · Feb 21, 2013 at 04:02 AM
Just to re-recap...
All I had to do is upgrade to IIS7 with GoDaddy.com and then create the web.config file in my root directory that defined the .unity3d file!
This is what the web.config had in it
(configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".unity3d" mimeType="application/vnd.unity" />
</staticContent>
</system.webServer>
(/configuration>
Cheers!:D
PS Due to code display issues I had to put ( instead of < at the beginning of the first and last line
Answer by ByteSheep · Feb 19, 2013 at 01:42 AM
When you build your game for the web player unity should give you a folder containing two files: a .html file and a .unity3d file...
It is important that these two files stay in the same location, otherwise you will get the blank loading screen on the web player.
The same goes for when you upload it to a server - make sure they are both in the same directory (best to create a seperate folder for the game)!
Hope this helps :D
Hello merry_christmas and thank you for your response. I did indeed upload the .html and .unity3d files together under their own unique folder.
In addition, the link above also includes the jquery.$$anonymous$$.js and UnityObject2.js files that were generated when the Offline Deployment and Development Build options were checked under the Build Settings for the Web Player. I wasn't sure if they would make a difference but I went ahead and tried this anyway just for safe measure.
This link has a new build without any Build Settings options. The only files in this new folder are the .html and .unity3d ones that you mentioned.
In either case I am getting the same results.
I have not tried enabling the Development Build feature yet because the Autoconnect Profiler and Script Debugging options seem irrelevant at this time.
Can you think of something else that might be happening here?
Thanks again!
The html file is located under http://www.donimation.com/Unity/TestBuilds/TestBuild004/TestBuild004.html
so the unity3d file should be located under http://www.donimation.com/Unity/TestBuilds/TestBuild004/TestBuild004.unity3d
However I have noticed that when trying to access the .unity3d file the server gives an error page saying that the file could not be found..
When accessing the .unity3d files on my server the browser doesn't give an error and lets me download the unity3d file. e.g.
http://leedsmusicscene.net78.net/SNGame2.unity3d
So from what I can tell the problem is either that the file is not in that directory or has been renamed (make sure you don't rename the html file or the unity3d file..) OR perhaps the problem lies with the webpage itself - I see you are using $$anonymous$$icrosoft on your webpage, but I don't really think that will be effecting the webplayer in any way :)
I guess in that case there must be something going on with the webpage.. What I meant earlier was that it'd looked like you had used $$anonymous$$icrosofts .net framework to create your webpage. Are you using wordpress on your site or anything similar? Or did you code the site from scratch? I am just wondering because I noticed another thing - when you type an invalid url like this: http://www.donimation.com/Unity/TestBuilds/TestBuild004/TestBuild004.unity4d into the url bar (notice the file extension .unity4d ins$$anonymous$$d of .unity3d) then you will get the webpages default 404 page saying "Ever feel like you are in the wrong place?".
However when you type the url under which the .unity3d file should be: http://www.donimation.com/Unity/TestBuilds/TestBuild004/TestBuild004.unity3d you get a different 404 page that says "the page cannot be found"..
The main reason this caught my attention is because you seem only get this 404 page when you try to access a file that does exist on the server but not when you try to access an invalid url to a file that doesn't exist on the server.
So, long story short from what I can tell it seems that the unity3d file is on the server but the access is being denied. If you are using wordpress or something similar then it may be that that is what is blocking certain file types from being sent from the server to a browser. - This is just an educated guess as to what might be happening though :)
http://answers.unity3d.com/questions/14400/godaddy-windows-hosting-unity-webplayer.html
Hope you get your webplayer running soon!
$$anonymous$$y website is hosted on a linux server so I haven't had any experience uploading unity3d files to a windows server.. There weren't any problems with the file types, it all ran pretty well without any hassle.
You may be able to get godaddy to transfer your website to a linux server ins$$anonymous$$d ;)
The 404 error your page is giving you when you try to access the .unity3d file is a general error message and doesn't really give much information about the error. According to this link, you can make the server give you a more detailed error message by putting the following in your web.config:
This might also let you see if the web.config file is even being read
Answer by kirpigiller · Feb 20, 2013 at 06:44 AM
Check your web-server properties. Probably .htaccess file. It seems like your web-server cannot send your .unity3d file, because of the settings. Allow to access to .unity3d files. Check that your file is located in the expected location (as merry_christmas told you)
404 error tells us that there's some problem with access to your file. It's not unity3d-related problem
@kirpigiller True, the .htaccess file is often used for similar cases.. However I think that windows based hosting uses the web.config file, while linux based hosting uses the .htaccess file http://support.godaddy.com/groups/web-hosting/forum/topic/htaccess-file-on-windows-hosting/
@donimation It would probably be worth checking whether or not you have a .htaccess file within any of the directories on your domain tho
Your answer
Follow this Question
Related Questions
Web player build crash on new scene load. 0 Answers
Distribute terrain in zones 3 Answers
Web Player Build Templates 2 Answers
Shared Web player project not loading 2 Answers
Is the Scriptable Build Pipeline only for building asset bundles and not players? 0 Answers