Categories & Tags

Unity and Facebook are now in a Relationship … and it’s Awesome!

March 26, 2013 in Technology by

The Unity Web Player is the best way to get games into players’ hands, and currently installed on over 200M computers. Facebook is a great way to get players playing and connecting with each other. A close collaboration between Unity and Facebook had the potential to bring happiness and joy to gamers all over the world, young or old, casual or hardcore, so we got together with Facebook and made magic happen.

After a road trip so epic that we’re optioning the story to Hollywood, the result was a Facebook Unity package (coming soon to an Asset Store near you) and Unity 4.1.2, with two major improvements already completed. Both of these projects simplify the development and deployment of Unity games to Facebook, while also making it easier for your players to game on Facebook.

Whenever a gamer wants to play a Unity game, they have to download and install the Web Player. We’re committed to making it easier and faster for anyone to download and play Unity games. Facebook is currently deploying a new Web Player install flow to help ease new players to Unity games through the download and install process, and we’re happy to report that this has significantly boosted the number of users installing the Web Player and enjoying Unity games on Facebook.

New Unity Web Player install dialog on Facebook (courtesy of Uberstrike)

To simplify the lives of game developers, Unity and Facebook jointly studied the development of immersive, high-quality games and collaborated on improving the Unity workflow. As a result, Facebook will soon release a new, free package to the Unity Asset Store, which wraps the Facebook API into a nice, easy-to-use C# SDK.

Using the new Facebook Unity package not only makes development easier, but it also allows your games to integrate much more deeply into Facebook’s user experience. Many Facebook prompts will now be displayed directly within Unity, allowing your players to post high scores, invite friends, and brag about their accomplishments without ever having to drop out of full-screen. Even better, on any platforms that don’t yet support these new Unity-native dialogs, the SDK will gracefully fall back to the old Javascript methods. In the future, we will expand the number of dialogs available natively inside of Unity, as well as add support for additional platforms beyond the Web Player.

Native Unity Facebook Dialog

Friend Smash, a test game where you smash your Facebook friends

In order to deliver this enhanced Facebook integration, we also developed some tools that will be useful for everyone, whether you’re writing a Facebook game or not. These will be available in the 4.1.2 release of Unity.

First, we added a new type of UI, a Modal Window. Modal Windows always appear on top of all other content. This allows you to make sure that the user doesn’t miss any critical information or UX flows. Another key feature of these new windows are that any input to them is only captured by the modal window. This makes them a secure way for plugin developers to capture input from the player without having to expose potentially sensitive data to a 3rd party.

Unity 4.1.2 also features the Chain of Trust. This new system allows a hosting web page to send a secret key to the Unity Web Player which will only be readable by a specific assembly. In order to access this secured information, assemblies must be signed. Only signed, authentic assemblies whose credentials match those specified by the hosting webpage are permitted to read the secret key, allowing the hosting site to securely extend its trust into the Unity run time. You can find more information on the Chain of Trust system here.

So what does all this new stuff used in the new Facebook Unity package mean to you? It means that you can integrate Facebook’s awesome social experience into your game easier. It also means that you can keep your players immersed in your game while you do it. If a player is running your game in full screen mode, the native Facebook UI allows you to keep them full screen so they don’t feel like they are leaving the game.

We’ll have more information soon, so stay posted here and on Unity’s Facebook page.

Share this post

Comments (61)

Comments are closed.

26 Mar 2013, 1:27 pm

Will the SDK only be available in C#? No JavaScript?

26 Mar 2013, 1:29 pm

Great news. I wonder if the facebook API wrapper can be used for iOS and Android development, or is it web-player only?

Gustavo B
26 Mar 2013, 1:31 pm

When will Unity stop surprising me?

26 Mar 2013, 1:34 pm

Official support is always better. Gratz UT!

26 Mar 2013, 1:35 pm

the sdk will be transparent to you, no matter its languaje.

26 Mar 2013, 1:38 pm

You guys are ruling the world!

Judy Tyrer
26 Mar 2013, 1:50 pm

While awesome, does it still have the restrictions for web players that we can’t use plugins? Both my database and my networking layer are plugins. It would be great if we had a way of accessing these and still use the web player in facebook.

26 Mar 2013, 2:32 pm

Behold Games is STOKED!!!! This opens up a million possibilities! Thanks Unity :)

26 Mar 2013, 2:43 pm

Really cool, also interested how this will work on iOS/Android and for Standalone…

26 Mar 2013, 2:49 pm

For now, this is only for the webplayer, but the intention is to get this working on more platforms in the future.

26 Mar 2013, 3:36 pm

I will never look at another Game Engine, ever again…

26 Mar 2013, 3:55 pm

I have a hard time understanding what this security measure means for us doing C#. For example, our game uses high level mono encryptions with remote bouncy castle to store sensitive data, this of course has a certain overhead, but why would I need this new trust certificate thing. Is there a way to still access the code once it has been obfuscated if we did not use external dll for our compagny API ? Or maybe its good only for third party developpers of Unity extensions ?

26 Mar 2013, 4:45 pm

Very cool news
Congratulations not only on the work with Facebook but also the additional new features that will serve us developers well in other situations.

26 Mar 2013, 5:53 pm

I am so happy to hear this. Facebook is a big part of my next game project. Thanks Unity!!!

26 Mar 2013, 9:04 pm

Two thoughts come to mind:
1. Unity now has a built in, natively supported method of accepting payments from customers! :O
2. Can I use this Chain Of Trust thing to secure my webplayers that are NOT being run from Facebook? If been looking for a means of doing that for ages now!

26 Mar 2013, 11:10 pm

The Facebook API is cool but i thought the Flash Export would make the webplayer obsolete anyway. Why still such a big emphasis on the webplayer ?
Havent looked at unity in a while, is the flash export still not mature enough ?

27 Mar 2013, 12:11 am

wow,what a nice idea

27 Mar 2013, 3:04 am

congratulations. i am so happy too, my unity game project as begin for 2013

27 Mar 2013, 6:19 am

Good news for Unity3D developers like us!
We recently launched our Unity3D based Cricket game in Facebook,

We are very eager to wrap our game with this package in the future!!!
Thanks UT!

27 Mar 2013, 8:15 am

what about standalone apps?

Joachim Ante
27 Mar 2013, 9:18 am

@Daniel: “Will the SDK only be available in C#? No JavaScript?”
The Facebook API can be used from JavaScript and C#.

27 Mar 2013, 12:50 pm

@KAYOONE – Totally agree, this is a clear sign that the development of the Flash Export is not going well and probably cancelled. I remember seeing some tech demo showing a beta of Shadowgun on facebook… almost 6 months ago now and no news…
This is really sad, the Unity Web Player really sucks and there’s no ‘real’ successfull facebook game actually using it (by successfull i mean > 1.500.000 MAU + in top grossing).

Was really looking forward for this…

Stephen Hodgson
27 Mar 2013, 6:53 pm

I wonder why Valve hasn’t tried to do the same with Steam.

28 Mar 2013, 11:51 am

So thanks,nice features!

29 Mar 2013, 4:14 pm

tiene los mejores juegos

29 Mar 2013, 4:15 pm

es salvaje

30 Mar 2013, 9:48 am

These are awesome news!!!

It’s lovely to see the Web player get this little extra boost – but I also can’t wait to get this API available for iOS, Android – and whenever that’s available – Windows Phone 8 (and Windows Store Apps, of course ;-) ). IMHO, Facebook is so important that having the relevant APIs “built in” (or at least have an official Facebook addon on the Asset Store) totally makes sense. I hope this will be integrated well into the UnityEngine.SocialPlatforms namespace of the Unity API, will it?

Regarding Flash vs. Web player: The Web player is awesome, and Flash is dieing its slow death. To me, that whole Flash build target only shows one thing: That UT can do things that would seem impossible (actually, the beta of the Flash build target was quite decent and they have released a final version of this build target a while back – I just never got to test that one because I’m not willing to spend any money on anything related to Flash ;-) ).

Eventually, HTML5 will be mature enough for Unity games and when that day comes, I’m pretty sure we will get an HTML5 build target … and that will be the final nail in Flash’s coffin … and I won’t be particularly sad about that ;-)

This is quite an exciting time for Unity developers :-)

30 Mar 2013, 4:31 pm

And when are they getting married? :P Lol, jokes. Anyway, I have been looking forward to seeing Unity with Facebook for a long time and it finally came!

31 Mar 2013, 10:11 pm

Thats a nice story to hear. Unity Rock!!!!
Keep surprising the world

2 Apr 2013, 2:43 am

The web player sucks? Please, if you find an issue with the webplayer, do let us know.

It is no secret or surprise that flash runs slower than the web player. It was never the intention for one to replace the other. Along with Native Client support, they are different ways of getting the same Unity project on the web – allowing you to optimise your offering for your target group.

So why should any of them drag the others down or prevent them from moving forward?

Again, if you find an issue with any of our platforms, making them suck for you, please let us know how and why so we can look into the matter. Our blog is a sub-optimal bug reporting service.

2 Apr 2013, 7:31 am

Looks great :) Will this asset compatible with Unity 3.5?

3 Apr 2013, 9:05 am

So are you telling us that the flash target is currently being worked on and we should expect feature parity with the webplayer in the near future (at least of simple things like lambdas and reflection)?

4 Apr 2013, 5:34 am

“i thought the Flash Export would make the webplayer obsolete” – no, the unity webplayer made flash obsolete some time ago. Unity’s flash export is just a bit of morphine, so flash can die easy.

14 Apr 2013, 1:40 am

So Unity 4.1.2 is out. But when is the facebook plugin coming???

14 Apr 2013, 8:57 pm


Well, I will say that in a friend’s and my tests of running Unity builds in the WebPlayer target that we consistently with multiple builds and different test settings got an average of 10FPS faster in Chrome vs Windows Internet Explorer 10 for Windows 8 x64.

Now I guess you’ve probably cheated and used NaCL optimization in the Chrome WebPlayer target, like stripping physics code if it wasn’t used.

And I do display having to practically write a chapter in a book simply to say ‘Windows Internet Explorer 10 for Windows 8 x64′…

14 Apr 2013, 9:01 pm

Working with computers totally warps standard English…

The last sentence should read:

‘And I do dislike’…

but I am modifying a now GUI to use some icons I spent a long time making…

21 Apr 2013, 3:12 pm

If you intend to open to casual gamers, so maybe you finally allow for usage of WebPlayer if some doesn’t have CPU with SSE2. It’s ridiculous you want be so pro but still have this strange limitation.

22 Apr 2013, 7:00 am

Looks great !
JASHAN CHITTESH :”HTML5 will be mature enough for Unity games and when that day comes, I’m pretty sure we will get an HTML5 build target [..] ”
and WebGL…

24 Apr 2013, 1:27 am

Is there an ETA for this? Could really do with it for a project i’m taking on in the next few days… was hoping it would be out by now =D

24 Apr 2013, 1:54 am

Fantastic items from you, man. I have take into accout your stuff prior to and you’re just too fantastic. I really like what you have obtained right here, really like what you’re stating and the best way in which you say it. You make it entertaining and you continue to take care of to keep it wise. I can not wait to learn much more from you. That is actually a great site.

24 Apr 2013, 2:03 am

The text says that the Facebook Feature would be released in version 4.1.2, but has not yet been released. There is a new forecast to be released?

Eugene Jo
26 Apr 2013, 5:41 pm

umm i have unity 4.1.2f and I’m still not seeing this. Any news?

29 Apr 2013, 11:11 am

Wheres the beef? I have 4.1.2f and I don’t see any of this.

I like Unity as much as the next guy but it sure would be nice if they spent some time fixing some of the bugs in the app before adding new features.

1 May 2013, 4:15 pm

I used to be suggested this website by way of my cousin. I am no longer sure whether this put up is written by means of him as no one else know such precise about my trouble. You’re incredible! Thank you!

7 May 2013, 6:23 pm

what’s ETA?

13 May 2013, 8:47 am

It’s been a while, still no release, ETA?

14 May 2013, 8:44 am

Magnificent points altogether, you simply gained a new reader. What might you suggest about your publish that you made a few days in the past? Any sure?

Adam Evanich
14 May 2013, 5:39 pm

Thanks for the effort writing this, really helped me :)
, , does anybody knows this site works? (:

14 May 2013, 9:00 pm

It’s perfect time to make some plans for the longer term and it is time to be happy. I’ve read this put up and if I may just I want to suggest you few interesting issues or suggestions. Perhaps you can write subsequent articles relating to this article. I desire to read more things about it!

15 May 2013, 8:03 am

When will this be available? Vaporware?

20 May 2013, 11:29 pm

I liked up to you will obtain performed right here. The cartoon is attractive, your authored subject matter stylish. nonetheless, you command get bought an shakiness over that you want be turning in the following. sick indisputably come more formerly again since exactly the similar nearly very regularly inside case you defend this increase.

24 May 2013, 10:14 am

what’s ETA? thanks !

26 May 2013, 2:36 pm

ETA = Estimated Time of Arrival

28 May 2013, 11:53 am

“I liked up to you will obtain performed right here. The cartoon is attractive, your authored subject matter stylish. nonetheless, you command get bought an shakiness over that you want be turning in the following. sick indisputably come more formerly again since exactly the similar nearly very regularly inside case you defend this increase.”

I agree.

29 May 2013, 1:16 pm

You know consequently significantly on the subject of that theme, taught me to be on their own believe it from many various facets. Their including women and men are usually not fascinated except it’s something to achieve using Pixie lott! Your very own products superb. On a regular basis take care of that!

30 May 2013, 7:59 am

When will this magic be available?

30 May 2013, 8:44 am

Thank you for every other informative web site. The place else may I am getting that kind of information written in such an ideal manner? I’ve a undertaking that I’m simply now operating on, and I’ve been on the look out for such information.

11 Jun 2013, 5:04 am

It’s 4.1.5 Now. ETA?, Thanks

13 Jun 2013, 6:59 pm

I will second that. Thanks!

15 Jun 2013, 5:31 am

You actually make it seem so easy together with your presentation however I to find this topic to be really one thing that I feel I might by no means understand. It kind of feels too complicated and very huge for me. I’m looking forward for your next submit, I’ll attempt to get the hold of it!

15 Jun 2013, 2:36 pm

Sweet weblog! I located it while browsing on Yahoo News. Do you might have any suggestions on how to get listed in Yahoo News? I’ve been trying for a although but I never seem to get there! Thank you

Leave a Reply

Comments are closed.