Search Unity

Update: We have released Unity 2.6.1 on December 2nd this year, which includes an update to the Mac Unity Web Plugin, which is fully compatible with 64-bit Safari on OS X 10.6 Snow Leopard.

So, most of you have probably heard the news: Apple is going to release Mac OS X 10.6 “Snow Leopard” this Friday. This release will give Mac users plenty of new feature goodness and new technologies to play with, and brings a lot of changes under the hood. Unfortunately, I must inform you that one of these changes may cause some grief for Unity users, at least for the time being:

Apple reengineered Safari to run as a full 64-bit application. While this is a good thing, it has a pretty big impact on plugin developers like us. Even though plugins do not actually need to be 64-bit binaries themselves, since they are now running as separate processes, they need to communicate with Safari using new 64-bit capable APIs. Basically, the old Carbon-based NPAPI is being replaced with a Cocoa-based version, which requires a lot of restructuring of plugin code.

Unfortunately, this change sort of caught us by surprise – the APIs which are now required have just been publically released in Safari 4.0, and are now being made mandatory to use in Snow Leopard less than three months later. Which now means that we won’t be able to ship a working web plugin for 64-bit by it’s release date this friday. We are working on it as hard as we can, and we do have a working proof of concept of Unity web content displaying in 64-bit Safari. We aim to release an updated plugin in October.

Until then, there are two possibly ways to play Unity web content on Snow Leopard: One is to use Firefox, which still works as always. The other one is to set up Safari to run in 32-bit mode. To do that, click Safari in the Finder, select Get Info from the context menu, and click on Open in 32-bit mode.

Setting Safari to use 32-bit mode

When users open web pages with Unity content in 64-bit Safari, all they will see is a blank screen where the content should be. However, it is possible to detect this situation from JavaScript, so you can at least display a meaningful error message on your site. When the plugin fails to load, the GetPluginVersion() function is undefined. Here’s some sample code, showing how to use that to display an error message:

if (navigator.appVersion.indexOf("Safari") != -1
&& navigator.appVersion.indexOf("Mac OS X 10_6") != -1
&& document.getElementById("UnityEmbed").GetPluginVersion == undefined)
document.write('<br>You are running Safari in 64-bit mode, which is not yet supported by ')
document.write('the Unity web plugin.<br>');
document.write('To see the content, switch Safari to 32-bit mode, or use Firefox. <br>');
document.write('See <a href="">this blog post</a>');
document.write(' for more information. <br>');

If you are using our default html template, you can just add this code after the line document.write(”);.

We apologize for any inconveniences this causes, and, as always, we will try to resolve the issue ASAP. Looking forward, though, moving to these new APIs will make the Unity web experience a better one, as this allows us to do more robust input handling, and proper layering of Unity content with other parts of your web site.

Oh, and before anyone asks: The Unity editor as well as standalone games made with Unity are unaffected by this issue.

33 replies on “Snow Leopard’s 64-bit Safari and Unity”

@leon: we don’t; there’s no 64 bit Safari on Windows that requires the plugins to use Core Animation API.

Since it has been a few months, I was just curious if we had an update on the status of the 64-bit version rollout.

Would be helpful if this information was posted on the download page for the Safari plugin. I’m sure many people not as savvy to search the blog or the forums would have found this information.

when i go to download my chaoticgame on line it don,t come in and i can not play the game thnak you .

@Conrad: This is not so much a question about Carbon vs Cocoa. It is a question of using a new API to communicate with the browser. If we had been using the previous, Cocoa web plugin API (WebKit), we would have been just equally screwed, because that is no longer capable of rendering OpenGL content in 64-bit Safari either. This is due to the way plugins are executed out-of-process now.

You should not be in the least bit surprised by this. It has not been ‘rushed’ out. Even before Leopard (not Snow Leopard) Apple have been telling developers that they are discontinuing support for carbon (at least 3 years ago). They have continually told developers not to use it, and to use cocoa instead.

Does this mean Unity widgets aren’t working on Snow Leopard? That would be weird, considering I’ve been submitting them to the Apple widget list and Apple’s been accepting them.

I’ve heard there are some wildlife groups trying to get Apple to do more stuff with the actual S.L.’s lol. I don’t know- people are saying it’s good PR for Apple- they should jump on that.

@Robert: I’m sorry but that is simply not something we can offer to do, we’re just not in a position to take individual names and notify you about this sort of issue. Please keep your eyes on our News page and/or RSS feed, or these blogs for any updates. Thanks!

Hi can you please contact me, when the 64 bit mode is working on safari with snow leopard.


@Chris: it’s not caused by 64 “bitness” per se. It’s caused by 64 bit Safari deciding “from now on, we’ll force all plugins to use a different set of APIs”. I guess Apple just chose transition to 64 bit as the moment in time to make this change.

I can’t believe that you are that surprised by this, everything, both Windows and Mac, has been heading towards 64-Bit for a couple of years now, so I am always shocked when a company doesn’t support 64-bit yet.

@Pirks: maybe Apple did let Adobe know about the changes earlier? Also, maybe Flash in Windowed mode does not use OpenGL. Just guessing here, but Flash is very widespead and surely gets a lot more attention than all the smaller web plugins.

If Flash had the same problems as Unity does, sure, we can do the same fixes. But we need to 1) figure out what and how needs to be fixed, and 2) fix it.

Maybe this is still a lousy job on Unity team’s side? I’m asking because 32-bit Flash plugin works just fine on 64-bit Safari _without_ switching Safari into 32-bit mode.

Why Unity guys couldn’t do the same trick that Adobe did with Flash for OS X?

Any comments on that? I’m just a curious engineer, would be nice to know how Adobe did that and why Unity team could not do the same. Thanks.

you can go to the application folder in snow leopard, right click on sarafi and get info, and check a box that says open in 32 bit mode. It worked for my 32 bit application “multiclutch”…

@Askhan: and why don’t we avoid poking and prodding at OS-war comments here, m’kay? :) Neither Microsoft nor Apple are perfect, each has problems, each has benefits, use what suits you and go from there.

Thanks for the heads up. The work around will work for me in the interim. All the best for coding the fix.
Apple is not taking care of their developers of late.

@Ashkan: IE8+Vista fullscreen problem is not solved for Unity Web Player yet. Microsoft did not respond to our bug reports either. For 64 bit Windows users in general, there are no known problems – Unity editor, player and web player all work there just fine.

@apple fans
OSX with all of it’s strength is not as developer friendly as windows. IE8 was in beta for several months and many compatability articles are available to help you solve your site or plugin problems with the new browser altho it has a problem about something that unity can not be shown full screen there. is there any problem for windows 64bit users? i know there is not much win64 users.
good luck

And Apple wonders why they have such a smaller software base… They’re constantly pulling the rug out from under both developers and users.

Is Unity a registered Apple developer? This was not apparent in seed builds? Boo on Apple if so.

Pretty crude on Apple’s part.
Thanks for giving us a heads up and good luck with the 64-bit version.

Seems like Apple knows how to make friends with developers. Doh – what a hefty change and impact. Good luck on getting this fixed!

I also would like to take your attention on the fact that the FBX I/O plugin doesn’t work at all with cinema 4D when this one is used in 64 bit mode. A collada support would be more appropriate. Thanks a lot!

I think it’s kind of unfortunate that Apple rushed this in like that – but I think it’s cool that you do your best to stay on top of things (even if, for now, that means a bit of working around the issue for us). I really appreciate how you’re handling this situation … and good luck on the plugin-interface refactoring! It’s also nice to know that this at least has some advantages ;-)

Comments are closed.