On several sites, we’ve put Unity content, but users seem to get the ‘invalid Unity file’ error. This is odd. Most of the times on the Windows platform, sometimes with FireFox 3, sometimes IE6 or IE7.
I would really appriciate if people responded with “OKAY” or “PROBLEM” after checking it out, so that we can see what’s wrong with the template (we use the default template).
Is it this one: (Please double check that this is the message you are always getting)
Invalid data file
Data file is corrupt (not a Unity Web Player file)
It basically happens when the browser tells Unity that the download is complete, but the header of the file can either not be completely parsed or the header is incorrect. The most likely explanation for it is that the server is only serving a small part of the file for some reason or the download aborts for some other reason. What are you using to host the content?
Not that it would make a difference but the file name looks a bit strange
“car.unityweb.unity3d” Whats up with that double extension.
It’s “Invalid data file”.
We are using Linux to host the content (our own dedicated web server).
Wouldn’t this result in the same errors with browsers and OSes?
Is it a MIME setting?
The double extension is a mystery. When I build the project it is appended automaticly.
It’s not added by default on my build of 2.1. In any case, just rename the file and remove the .unityweb and update the html.
It seems like the issue is on both OS X and Windows. Since i’ve never seen this issue before with any unity content, I would think it is related to the web server. Possibly mime settings or something in the cache settings.
First thing I would try is hosting the file on another web server.
Works for me now. Last time i checked the issue was:
On Firefox, when both the 1.x and 2.x plugin is installed and visiting your page while it had the unityweb extension causes the issue. Same works fine on Safari, presumably because mime handling in Safari is different.
Now with your change, removing the unityweb extension it works correctly for me, so lesson to learn, don’t put unityweb as an extension on a unity3d file.
As I recall from a year ago, that double extension occurs when you’re upgrading a Unity 1.x project to 2.x. - apparently the .unity3d is appended to the entire filename you used in 1.x. (It was a minor inconvenience and didn’t seem worth reporting as a bug, at the time, but maybe it was!)
I don’t have a solution, but I have had scattered reports that this was happening as well. So presumably it’s happening more but most aren’t bothering to try and contact someone about it. There hasn’t been a good opportunity to get further information.