Unity 4: AAA graphics and performance for your mobile games

July 5, 2012 in Technology

Hi from the Unity Mobile team,

With Unity 4, you will have 10 platforms to which you can publish your awesome game. But in this blog, we’ll focus on the updates and new features for mobile development. You can start by taking a look at this video, which gives a nice overview of the features for mobile development. For more technical information on each feature, just keep reading! Thanks.

Dynamic Shadows

Unity 4 includes one of your most requested features: dynamic shadows on mobile devices! Mobile hardware is getting faster and faster, and with Unity 4, you can now cast hard dynamic shadows from directional lights.

Dynamic Fonts on Mobile

In Unity 4 you will be able to use dynamic fonts on mobile devices. You can include any OS fonts without having to include font data in your build. At runtime a font sheet is dynamically created with only the characters that are currently needed. This allows you to keep the build size down. If you do not want to use an OS font you can also embed ttf files (and fall back to OS fonts for missing characters / languages). Using dynamic fonts (embedded or not) saves runtime texture memory in languages where you have many characters, but typically do not use all of them. Additionally, Unity 4 also supports using HTML-like markup when rendering text. This allows for easy insertion of styles in an inline manner.

Both dynamic fonts and HTML like markup are part of the core unity product and are not limited to mobile platforms.

Normal maps considered when lightmapping

Lightmaps are a great way to improve the graphical fidelity of a game. In Unity 4 it is possible to bake lightmaps so that normal maps are included in the baking process. This means that it is possible to see the normal map information in static lighting. This works in all rendering modes and is not just limited to mobile hardware. This feature helps make lightmaps look amazing.

Automatic upscaling when rendered in lower resolution

In Unity 4 it’s possible to set a resolution for rendering that is different to the native device resolution. This allows you to render your game at a resolution lower than the screen resolution then for display upscale to the devices’ native resolution. Because you are rendering to a smaller buffer for the majority of rendering you will see good performance gains.

Eclipse project generation for Android

When building to Android you can now generate an Eclipse project instead of directly publishing from Unity. Doing this allows for easier integration and iteration when using third party libraries and you can also add Android specific code at this step. Once deployed to a device debugging can also be done via Eclipse.

GPU Profiling for Android devices with Tegra

When trying to squeeze the most of out of a game it’s important to profile. Profiling helps identify areas in your game that are running too slow, and areas that could have more assets added to them. You can now perform GPU profiling on a mobile game for Android with a Tegra chip. By using the Unity profiling tools you can profile on Tegra the same way that you would on a PC game. This includes getting individual draw call timings and being able to examine on a per frame basis the state of the rendering pipeline (memory usage, render texture usage, etc).

Comments (33)

Subscribe to comments
  1. BlueHeadlights

    September 14, 2012 at 5:58 pm / 

    Unity 4 is really impressive, I would never imagine to see all those features on a device.

  2. Su Rubinow

    September 8, 2012 at 3:30 pm / 

    Hi there, just became aware of your blog through Google, and found that it’s truly informative. I’m planning to watch out for brussels. I will be grateful if you resume this in future.

  3. Amazing Online Deals

    September 8, 2012 at 12:37 pm / 

    Generally I don’t read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing taste has been amazed me. Thanks, quite great article.

  4. Icaro

    August 17, 2012 at 4:45 am / 

    Will Unity3D 4 allow to access mesh data from the TextMesh(like MeshFilter)?

  5. Artonator

    August 14, 2012 at 11:14 pm / 

    In unity 4, how many light can cast shadow on mobile ?

  6. Serwis komputerowy

    July 27, 2012 at 4:15 am / 

    All these games look amazing in the video. I hope it will increase interest in the Windows Phone, because I do not what to play on my phone … everything is in its infancy

  7. Brn

    July 15, 2012 at 10:48 pm / 

    Great additions, Lightmaps that use normalmaps normals and profiling of the GPU would be enough for me to upgrade. @ Francois, Although its not straightforward DOF in a real game context is possible now with unity mobile.

  8. Nathan

    July 9, 2012 at 2:36 pm / 

    Single out any one of these upgrade features and I’m looking forward to it! :)

  9. xCyborg

    July 9, 2012 at 11:45 am / 

    Marvelously armirable, this is like the nexus singularity moment for Unity, so much in so little time.
    I hope however for more fancy integrated shaders for mobile.
    Is it AA there in Android finally? Keep up.

  10. Chris

    July 8, 2012 at 3:40 am / 

    The introduction of dynamic fonts is awesome but I did notice that three of the characters in the ‘Bold’ text are overlapping.

    Is there any way to adjust the character spacing or kerning?

  11. Chris

    July 8, 2012 at 2:34 am / 


    From squinting at the Unity editor title bar it looks like:

    MedievalTown.unity – Mobile Shadow Demo – Android

  12. Brett

    July 7, 2012 at 11:05 pm / 

    While I am looking forward to the dynamic fonts and shadows. My wish list includes getting an official solution for Android Apps over 30/50 MB for Google Play with expansion APK support. (Asset Bundle are slow, consume additional RAM, and require additional work). I really would like something that would allow me to use the Resources folder and have a separate download of this resource folder using the XAPK option.

    I would also like some additional options for the VERY lacking Handheld.PlayFullScreenVideo().

    Oh well off to feedback.unity3d.com I go I guess.

  13. Francois

    July 7, 2012 at 1:14 pm / 

    (in my previous post, i obviously meant on mobile )

  14. Francois

    July 7, 2012 at 1:13 pm / 

    shadow maps –> does that mean we can expect other depth based fx to be feasible (like image processing DOF or SSAO) ?

  15. Ethan

    July 7, 2012 at 1:05 pm / 

    What was the game at 1:18?

  16. Aras Pranckevičius

    July 7, 2012 at 10:45 am / 

    @Alan: text formatting is for all platforms.

  17. Alan

    July 7, 2012 at 9:22 am / 

    Although I currently do not develop for mobile, the rich text feature (HTML formatting) for GUIText is impressive and I would love to have it in the current version of Unity. Will this be available for standalone and webplayer too or is this a mobile exclusive feature?

  18. Rogger T.

    July 7, 2012 at 3:40 am / 

    What about level streaming volumes for Unity and Unity Mobile ?

  19. Hermes David Montes de Oca Segovia

    July 6, 2012 at 3:19 pm / 

    sounds really great, glad i got my 4.x license upgrade yesterday hehehe

  20. Toad

    July 6, 2012 at 1:49 pm / 

    @ James – Right now Unity can build to PC, Mac, Web, Google Native Client, Flash, iOS, Android, Xbox 360, PS3 & Wii, and Linux is coming to Unity 4.0!

  21. coolpowers

    July 6, 2012 at 12:16 pm / 

    I assume the automatic upscaling will be available in the basic licenses? Because of course you can already do that with render textures in Pro. I also echo the question about selective elements (i.e. UI) being rendered native.

  22. Andrew M

    July 6, 2012 at 12:10 pm / 

    Robert and Nicolas M: Thanks, I thought I had read otherwise a while ago and hadn’t seen an update about it.

  23. James

    July 6, 2012 at 12:01 pm / 

    What are the 10 platforms Unity 4 is covering?

  24. Brett

    July 6, 2012 at 9:25 am / 

    The video doesn’t load…it just sits there with the animated gif. Youtube mirror?

  25. Toad

    July 6, 2012 at 8:57 am / 

    Another cool blog post. Really appreciate getting these updates on upcoming features/enhancements. The more you engage with the community the better in my opinion. Thanks! Bring on Unity 4.0!!

  26. Lukas

    July 6, 2012 at 4:23 am / 

    I really like this new style of Unity with these info video’s. Its a great concept, looks highly professional and works really well.

    Great talk Tim!

  27. Neutron

    July 5, 2012 at 9:01 pm / 

    Sound good. With the upscaling, will we be able to render the scene at lower res on a retina resolution device, and render the UI on top at full resolution.

  28. Pete

    July 5, 2012 at 6:22 pm / 

    Will dynamic fonts be also available for the Web (NaCl, Flash and WebPlayer)?

  29. Geoff

    July 5, 2012 at 3:24 pm / 

    I love hearing about mobile features. Every time I read about a new Unity feature I ask myself, “Yeah but does it work for mobile?” It’s great when mobile is discussed directly.

  30. Nicolas M

    July 5, 2012 at 8:23 am / 

    @Andrew M that’s already the case.

    See for example this demo project: http://unity3d.com/gallery/live-demos/shadows

  31. Robert Cupisz

    July 5, 2012 at 8:17 am / 

    @Andrew: The web player supported full dynamic shadows from the very beginning, just like standalone builds.

  32. Andrew M

    July 5, 2012 at 7:53 am / 

    Are there any plans to bring dynamic shadows to the webplayer as well?

  33. Danjel Ricci

    July 5, 2012 at 7:28 am / 

    Awesome! Dynamic Font on mobile devices are always been a much requested feature, it’s useful as hell. Combined with the incoming new GUI system, this will be perfect.

Comments are closed.