This is the first time I’ve tried publishing to the Unity Web Player and then uploading it to my website and I keep getting an error message that says " Failed to Download Data File"?? It really strange because I know the file exists on my server and double checked it several times. Here are the links:
Both work fine when I open the html file from my local hard drive, but once I upload them to my server I get that error message? The first link above is a small 4 mb unity game, while the second comes in around 37 mb.
Any suggestions on this would be greatly appreciated. I did try doing a search on this forum first before posting this topic, but I got pages and pages of results.
only time i’ve had that happen is when i accidently uploaded a package instead of the build. also, if you’re using the default html layout, make sure they’re next to each other on the server.
The problem is most likely due to your having spaces in the name of the Unity file. You either need to replace the spaces with ‘%20’ in the HTML, or better still, eliminate all spaces from the filenames…
Since this is the first time you are trying it from your web server this could definitely be a problem with your server not being configured to serve the proper mime type for the .unity3d file extension.
Most web hosting control panels let you access mime type settings for the server.
Make sure your server has a mime type for .unity3D set to: application/x-unity
Thanks, guys. I’ll give those suggestions a try and see what happens, but having spaces in file names never gave me problems before. I know that it’s not standard practice but it should still work.
Ricko, Your the Man! I can’t thank you enough! That mime type issue you mentioned was the exact cause of my problem. Your instructions were very clear and almost totally resolved my issue. I had to wait 2 hrs for the mime type change to go into effect, but now my game loads on the web for the first time…albeit very slowly because I haven’t done a whole lot yet to optimize for the web and it’s a whopping 38mb! But, I’m just thrilled that I finally got something online.
One minor thing though… What’s the difference between a .unity3d file type and a .unityweb file type? My small 4mb marble game demo from Unity 1.0 that I published for web has the .unityweb file extension? Added that mime type to my server as well, but that one still doesn’t play. The error message now says “Failed to Update Unity Player”?
I’d rather they focused on significant advancements like from 1.x to 2.x, and keeping the webplayer as small a download as possible, rather than backward compatibility of the webplayer… especially since you control the unity version of your content, and the webplayer version you are embedding on your page - which makes it a non-issue.
Does everything in the Project Window get included in the final build or does it only include what you actually used in the Hierarchy window? The reason I ask is because there is a lot of stuff in my Project window that is not actually used in the game and if that is what is increasing the file size I can just remove it. As with Flash… it used to be that everything in your library would get published with your file even if you didn’t actually use it in your Flash scene… but then Adobe updated Flash so that you didn’t have to worry about that… now it only publishes what you actually use in your scene. Is this what Unity does?
So are you telling me that if I hadn’t upgraded to Unity 2.0 and was still using Unity 1.x that the content I created wouldn’t work for all the people who downloaded the current web player? If so, that’s just not right. That would mean that every time they upgrade Unity that I will have to go back and update all the games I make with the previous version ?? Who has time for that?
I think you need to re-read my post. That is not what I said at all. I said you control the version of the content and you control the version of the webplayer embedded in the webpage, so it is within your control to make sure they work together. Upgrading the authoring tool is completely independent from keeping previously published titles working.
Your marble player error mentioned above didn’t happen to me. It played fine. I’ve seen that error though for people that had beta or test web players installed from an old version, maybe that is the cause.
I initially had the old unity web player installed on my machine, but after I uploaded both games (One made in Unity 1.x and one made with Unity 2.x) and they didn’t work I downloaded and installed the new web player to see if that was what was causing the problem… and then that caused the MarbleMania game to completely stop working… on or off-line. A lot of wasted frustration here. If the web player was backwards compatible with Unity 1.x games that would not have happened and my MarbleMania game would still work. I have stuff that I made in Flash 3 that still works with Flash Player 9! I can’t imagine what hell I would have had to go through if I had to update every Flash file I ever made every time a new version of Flash came out. I hate to be the voice of opposition here, but this one is a no-brainer. Especially considering how complex Unity games can become. It’s also not good for the end users who may have Unity games online that they want to continue playing, but as soon as the next web player is released their favorite online game may no longer work?
I can only control the version of the web player installed on my machine… if everyone else (the end users) download the current version then they won’t be able to play Unity 1.x authored games? Is this correct? Maybe I’m confused and not understanding this correctly.
I fixed it. They both work now on my Mac. What a relief. Apparently, I needed to have both web players installed (old and new). I made the mistake of assuming that installing the current web player would overwrite the previous version during installation, but it does not. They can coexist together without creating any strange problems? Maybe that explains why they have different file extension? Now i see. But that still doesn’t change the fact that if I have a game posted on my site that was created in Unity 1.x and then someone comes to my site who doesn’t have any Unity web player installed on their machine and then they are directed to download the current web player … the game will not work? Is this correct or does the code in the html that is used to generate Unity 1.x web content direct people to install the old web player?
Yes. They made the choice to not have backwards compatibility with 1.x, so 2.x-infinity (maybe ) will work without having to go through this again. In other words, it’s easier to make the break now then it would be with 3.0 or later, when there are more people using it and it would have the potential to cause more problems.
Anyway, it should work where the user gets the right version, if it’s not already installed. So the worst that should happen is that maybe someone with who has neither player installed views 1.x content, downloads the 1.x player, then views 2.x content and has to download another player.
I get it. Thanks Eric! It all makes sense now. Thanks also to Ricko! You guys are really very supportive and helpful and that is really appreciated. I’m so exited about Unity and what I’ve been able to accomplish with it in just 2 months is simply astounding. I will definitely spread the word!
Basically what happened was that we had to cut upwards compatibility this one time, because of some early choices we’d made in how the file format was structured.