Search Unity

Unity and Facebook are now in a Relationship ... and it's Awesome!

March 26, 2013 in Technology | 4 min. read
Topics covered
Share

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
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.

March 26, 2013 in Technology | 4 min. read
Topics covered