Our latest release, and the final installment in the Unity 5 cycle, includes the Progressive Lightmapper preview, new Light Modes, Vulkan support, a new video player, support for Facebook Gameroom, Google Daydream and much more.
Unity 5 launched two years ago at GDC 2015, and today we conclude the cycle with the release of 5.6. We hope that your projects will benefit from the many features and improvements that it includes.
Massive lighting improvements
5.6 includes the Progressive Lightmapper preview, which provides immediate feedback when trying out different lighting scenarios, and much faster iteration compared to the current Enlighten solution. 5.6 also offers Light Modes, which allow for various ways of mixing real time and baked lighting for static and dynamic objects.
Improved graphics performance
GPU Instancing, which enables new kinds of effects where many similar objects are needed at a very low performance cost, has been improved with support for Procedural Instancing. And with the addition of Compute Shaders for Metal, you can now add more details to your games by tapping into the raw power of the chipsets on Apple iOS and macOS.
Vulkan support brings increased speed while reducing driver overhead and CPU workload; this leaves the CPU free to do additional computation or rendering and saves on battery life for mobile platforms.
Massive update to Particle System
5.6 greatly extends the range of particle effects to give more options and control to the user. This update also significantly improves Particle System performance.
New Video player
A new multi-platform video player enables playback of 4k video allows you to build 360-degree video VR experiences.
Navigation system improvements
Improved AI and Pathfinding tools–also referred to as the NavMesh system–expand the possibilities to manipulate multiple nav meshes and agents. And, new tools for procedurally generated or dynamically loaded content enable a whole new set of use cases and gameplay options for character navigation.
New 2D tools and improvements
Unity 5.6 adds a whole set of 2D features that give you more control and make it easier to create complex 2D objects. New features for 2D physics enable new kinds of gameplay and effects, including fully featured particle effects interacting with 2D objects.
One of the top performing tools on the Unity Asset Store is now available for free to users of 5.3+ and will be soon be natively integrated into Unity. TextMesh Pro features advanced text rendering with dynamic visual text styling, along with greatly improved control over text formatting and layout.
Performance Reporting and debugging improvements
In addition to exception reports, Performance Reporting now collects native crashes for iOS. Physics debug visualization and profiler improvements make it easier to find the source of performance issues in the game.
With 5.6, you can seamlessly publish to Facebook Gameroom, as well as Google Daydream and Cardboard for Android and iOS. Nintendo Switch support is also available now.
Unity Collaborate (Beta)
We added new options when publishing changes for finer control of your Collaborate projects.
Experimental support for WebAssembly
In 5.6 we bring experimental support for WebAssembly, a new cross-browser technology designed to help improve the Unity WebGL experience.
Progressive Lightmapper (preview)
One of the most notable 5.6 features is the new path tracing-based solution, the Progressive Lightmapper. It allows for fast iteration on baked lighting and an ETA. In 5.6 it’s available as a preview feature.
When we launched Unity 5.0, Beast was replaced with Enlighten for both baked and realtime global illumination (GI). However Enlighten does not suit every use case for baked lighting, hence the need to provide a solution with the Progressive Lightmapper.
We wanted to create a solution that not only gives great results for baked lights, but also offers lighting artists an improved workflow, including the ability to iterate quickly and predictably.
In previous Unity releases, changes to the scene required a new bake and the results could only be shown when the bake was done. In 5.0, Enlighten allowed Unity to provide a preview of the final bake using precomputed realtime GI. It gave you an idea of how the bounced light would look, but the final result could deviate from the intermediate one.
Changes to lights, emissive materials and albedo values could be previewed straight away. However, changes to geometry still required a rebake, during which you got no feedback.
When iterating on baked shadows, for example, or the level of bounced lighting, waiting minutes, or even longer, between iterations can be very frustrating. This ultimately reduces the number of iterations one can do in a given amount of time. As a consequence, it limits the quality you can achieve with your baked lighting. With the Progressive Lightmapper you will get almost immediate feedback. A noisy result at first, but it rapidly improves directly in the Scene View, allowing for higher quality and more freedom of artistic expression.
The preview label will be removed once we reach feature parity with the Enlighten-based lightmap baking solution. This will happen during the 5.6 cycle. Support for Light Modes, baked LODs, and reduced memory usage is coming as soon as possible.
New Light Modes replace Mixed mode lighting
Light Modes are replacing Mixed mode lighting, which make it possible to combine baked lighting with real time lighting, including proper handling of baked and realtime shadows. We provide several presets to cover a wide range of scenarios, including fully realtime GI lighting, partially baked lighting, and fully baked lighting. We have added the ability to bake shadowmasks, providing “past realtime shadow distance” shadows. This greatly reduces realtime shadow distance for increased performance. Higher visual fidelity is also achieved as far distance shadows are supported along with realtime specular highlights. Realtime shadow fade out has been added for every light type and rendering path, and the transition to shadowmasks from realtime shadows is seamless.
Mixed lights Light Modes:
We have also redesigned the lighting window for better usability, and added a new Light Explorer window to streamline the work of lighting artists.
Support for Vulkan–take graphical performance to the next level, and save on the battery lifetime for mobile devices
Vulkan is a new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs on desktop and mobile platforms.
It’s designed to take advantage of multiple CPU cores by allowing multiple threads to run in parallel. This means increased speed with reduced driver overhead and CPU workload, leaving the CPU free to do additional computation or rendering. In total, we’ve seen a rendering performance improvement out-of-the box up to 30-60% using Unity–that is without having to deal with any specifics of the Vulkan API.
Another Vulkan benefit is a lower power consumption over the same content being rendered using OpenGL ES. On average Vulkan is at 88-90% of OpenGL ES consumption, hence the “10-12% extra play time,” as demonstrated in the below video where you can see the power consumption relative to OpenGL ES.
Unity 5.6 adds Vulkan support on Android, Windows and Linux platforms. We also added initial support for OpenVR.
TextMesh Pro is now free, with native integration into Unity coming soon
As part of GDC 2017, we announced that one of the top performing tools on the Unity Asset Store was set to become a part of Unity.
TextMesh Pro is a replacement for Unity’s existing text components, such as Text Mesh and UI Text. TextMesh Pro uses Signed Distance Field (SDF) as its primary text rendering pipeline making it possible to render text cleanly at any point size and resolution. Using a set of custom shaders designed to leverage the power of SDF text rendering, TextMesh Pro makes it possible to dynamically change the visual appearance of the text by simply changing material properties. Add visual styles such as dilation, outline, soft shadow, beveling, textures, glow, and save and recall these visual styles by creating/using material presets.
TextMesh Pro provides improved control over text layout and formatting, giving users control over character, word, line and paragraph spacing, support for kerning and basic hyphenation, plus additional text alignment modes like Justified and Flush text. Over 30 Rich Text Tags are available to give users control over margins, indentation, user definable styles, links and even support for using multiple fonts and graphics inline with the text.
We have already started work to integrate TextMesh Pro’s functionality into Unity 2017, and will continue to support the asset with periodic updates to functionality and compatibility, ensuring a seamless experience for TextMesh Pro users.
Until then, you can download the new and freely available version of TextMesh Pro (Unity 5.3 or higher required) from the Asset Store.
Graphical improvements: procedural instancing
The 5.6 version also includes a lot of improvements for overall graphics, including the Particle System and GPU Instancing.
The GPU instancing introduced in 5.4 and 5.5 allows you to draw many instances of the same mesh using an instanced shader in a single draw call, while still allowing a per-instance data set, including position, rotation and color. When the CPU is the factor limiting your framerate, instancing can provide a significant performance benefit. To enable instancing on the Standard Shader, tick the Enable Instancing checkbox on the material settings. Alternatively, you can manually add instancing support to your own shaders.
In 5.6 we now support Procedural Instancing, where instance data is supplied via a custom source in the Shader, rather than from Material Property Blocks and Support for DrawMeshInstancedIndirect, where draw arguments are supplied from a ComputeBuffer. This new way of rendering instances via script has almost no CPU overhead, resulting in a massive performance boost, assuming the CPU is the limiting factor for your framerate.
Check our documentation on how to get started.
Graphical improvements: particles
In Unity 5.5, we added support for attaching custom data to your particles, which can be accessed from both script and shaders. In 5.6, we have extended this system, so that you can configure the data directly in the Inspector making it simple to define curves and colors that can be used to drive custom logic in your scripts and shaders. As a bonus, colors defined in this module can also make use of the High Dynamic Range, something that hasn’t been possible with the Particle System until now.
We also improved the workflow by allowing you to work with several particle systems in parallel.
The Cone, Circle and Single Sided Edge shapes now come with new parameters to control how particles are spawned. Previously, all particles were spawned randomly, either on the surface, or within the volume. Now, particles can be spawned sequentially, or only at desired increments.
It’s now possible to specify a repeat count and interval for your burst emission. Previously, each burst could only be triggered once, and there was a limit of four total bursts. With the new system, you get eight total bursts, and each one can be repeated any number of times.
Finally, particle instantiation is now over 2x faster in the Standalone Players.
We have added a physically based rendering material validator enabling Albedo and Specular values to be validated against acceptable ranges. Albedo values can also be validated against user defined luminance ranges.
Graphical improvements: Compute Shader for Metal
We have also added support for Compute Shaders for Metal in 5.6 for both iOS and macOS. The compute shaders are written in HLSL just as for other target graphics APIs in Unity, and they get translated to Metal Shading Language (currently limited to Metal v1.1). If you wish to reuse existing regular shaders using UAVs, make sure to use pragma target 4.5 instead of 5.0. We also added experimental support for using the Metal rendering backend on the Editor.
New Post Processing Stack
The new Unity post-processing stack (successor of now deprecated Cinematic Image Effects) has been released and is available for Unity 5.6 (and 5.5). You can get the new Post Processing Stack essential package from the Asset Store for free.
It’s an über effect that combines a complete set of image effects into a single post-process pipeline. This has a few advantages :
It comes with the following effects :
The stack also includes a collection of monitors and debug views to help you set up your effects correctly and debug problems in the output.
New Video Player with 4k playback
5.6 contains a complete new Video Player rebuilt from scratch with hardware accelerated performance in mind. High resolution 4K playback is now possible, along with videos supporting alpha channel. It aims at using the video hardware capabilities of both the editor and target platforms. It has H.264/AAC hardware support available on a wide variety of platforms, and VP8/Vorbis software implementation for situations where using H.264/AAC is not possible or desirable. Support for other codecs will be added in the future.
The Video Player simply works as a new GameObject component for playing back movies in your scene, providing immersive interactive video experiences with high quality hardware accelerated performance, as well as improved 360 degree support for high resolution content. To see a demo of how it works, check out the keynote from Unite 2016.
NavMesh: Improved pathfinding and AI
In Unity 5.6 we are introducing low level APIs aimed at solving the limitations from previous versions. These changes enable a whole new set of use cases and gameplay options for character and AI navigation. In addition the low level APIs, we are also providing four new easy-to-use components that are open source and available from Github.
The ability to use Unity’s NavMesh tools for procedurally generated or dynamically loaded content has been the most requested feature. With the new features in 5.6, it’s not only possible, but easy and very efficient. Simply load or generate your scene and then tell the NavMesh surface to Bake.
With the new feature set, NavMeshes are now component-based instead of being scene-wide. This new structure allows you to have multiple NavMeshes per scene. Additionally, we can now have different agent types. This allows you to easily adjust radii, heights, and traverse settings for your different characters.
With the addition of the NavMeshSurface component, our NavMeshes can be aligned with game objects instead of world axis. This means that we can orient our nav meshes in any direction we want in 3D space. This is a huge addition for people who want to use our navigation tools for 2D games, or people that want to align their navigation systems independently of the Y axis.
Since NavMesh baking is handled by a component now, it is no longer tethered to an entire scene. This means we can choose which elements become a part of the bake or we can choose to bake specific volumes. If you’ve ever had a level that was just too huge to use a NavMesh, you can now simply and efficiently generate just the amount of NavMesh you need for your gameplay. This saves a ton on bake times and memory overhead during playback. Using this method, only the areas that have changed will rebake and since it’s multithreaded, it’s super efficient.
New features improve the 2D game development workflow
We’ve been working hard on more 2D support, and are happy to announce several new 2D features in the 5.6.
The Sorting Group Component provides the ability to render a set of objects separately from others on the same Sorting Layer. It ensures that all renderers that are children of the Sorting Group are sorted together, making it useful for managing complex scenes.
The new Axis Distance Sort addresses Z sorting problems by enabling you to set the Transparency Sort Mode to a custom axis.
The Outline Editor is a new addition to the Sprite Editor Window. It can be used to either automatically generate a selectable level of tessellation, or manually edit the mesh shape of the sprite. You also have the ability to control the tessellation quality by choosing how closely the mesh resembles the actual image.
We’re introducing 9-Slice Sprite, a 2D technique for the SpriteRenderer, which allows you to reuse an image with variable dimensions without preparing multiple assets in games. It’s similar to the 9-Slice used in the UI. This allows you to stretch or repeat defined areas of an image as dimension changes, providing a quick technique for creating platforms or backgrounds, while still using a small amount of texture memory.
Finally we have also added EncodeToEXR to Texture2D. This allows you to save the content of any HDR texture to an EXR file on the disk, similar to EncodeToPNG and EncodeToJPG for non HDR textures.
2D Physics improvements and features
For 2D physics, the internal 2D contact processing system has been completely rewritten providing a more robust and reliable reporting of contacts, ensuring correct Enter, Stay & Exit callback state under all conditions.
Along with the numerous changes made to the 2D physics API, several stand out:
A new component in this release is the CompositeCollider2D, which allows you to merge both BoxCollider2D and PolygonCollider2D together (more collider support is coming) into a single combined Collider2D, using either polygons or outline (edge) generation. As well as providing a single continuous surface formed from multiple separate Collider2D, this solution can also significantly speed up scene loading when many separate Collider2D are merged into a single composite. The CompositeCollider2D has all the features you’d expect from any Collider2D: it can have materials, be a trigger, used by effectors, and attached to a Rigidbody2D, etc.
With the new EdgeRadius feature, you can configure a radius on BoxCollider2D or EdgeCollider2D, allowing for expansion of edges and curvature of vertex.
As part of the API improvements, there is also a new Distance function designed to allow you to ask for the nearest distance or overlap (penetration) of two Collider2D or Rigidbody2D. Using this function, it is possible to solve overlap of Collider2D or all on a Rigidbody2D. When used with a Kinematic Rigidbody2D, complete custom solving is at your disposal.
Finally, the particle collision code for 2D Colliders has also been completely rewritten using the new SIMD library to provide fast collision rejection, resulting in a significant increase in performance (approximately 10x faster). Additionally, a new 2D Collider overlap solver for particles has been added, resulting in faster and more accurate escape from overlap.
Native iOS crashes now captured by Unity Performance Reporting
Unity Performance Reporting automatically collects application errors, across devices and platforms, so it’s easier for you and your team to find and address issues in real time. Performance Reporting now captures and reports native crashes recorded for iOS games (for example when a native Objective C plug-in crashes your game), with support for even more platforms in the future (Android next!). It doesn't require any code to use Performance Reporting on for your Unity project. Just turn on “Performance Reporting” in the Services window to get started.
Physics debug visualization
It can sometimes be hard to tell what objects in your scene should and should not be colliding, especially when the Render and Collision meshes are out of sync. To help you quickly inspect the collision geometry in your scene, we have added a debug view mode for physics collision geometry. It’s designed to provide a “ground truth” for what is going on in our physics middleware and to quickly find the corresponding Colliders in the Unity scene. It also serves as a profiling tool as it can hide all sleeping Rigidbodies, as well as show all concave MeshColliders.
Exposed physics depenetration functions and improved editor UI
We’ve exposed two new functions, Physics.ComputePenetration and Physics.ClosestPoint, to help with writing custom depenetration functions. Physics.ComputePenetration returns the minimum translation required to separate the two given colliders apart.
Notice the magenta ray. It’s exactly the offset required to separate the sphere and the capsule apart.
Physics.ClosestPoint computes the point on the surface of a given collider that is closest to a particular point.
We also unified the interactive handles for editing primitive 2D and 3D Colliders in the Scene View. They now all use the same logic and support new modifier keys (Shift and Alt) making it easy to edit the collider’s dimensions, pin the center in place, or scale the shape uniformly from any direction.
We added TreeView IMGUI Control, which can display hierarchical data that can be expanded and collapsed. You can use the TreeView to create highly customizable list views and multi-column tables for Editor windows, which you can use alongside other IMGUI controls and components. You can customize with regards to row content rendering, dragging logic, selection logic, searching, sorting and renaming of items.
To help get started with the API functions, please visit our Unity Scripting API documentation or TreeView manual.
We improved the amount of data sent to the GPU for each UI element, adding a new 'AdditionalShaderProperties' to the Canvas. This changes the default behavior for all new Canvas components that are created and reduces the memory cost of rendering the canvas, as additional unused channels are excluded.
If you are using Visual Studio 2017, you will notice that installs with the Unity workload are now detected automatically, and shown and added to the External Script Editor list.
Google Daydream & Cardboard VR support
5.6 supports native Google VR for both Cardboard on iOS, and Android and Daydream on Android. To get optimal performance and latency from the Daydream platform, we integrated with the Google VR NDK to leverage the platform’s asynchronous reprojection and VR performance modes.
Compared to the Daydream support in the Google VR SDK for Unity released at Google I/O, we now provide a more streamlined workflow, significant optimizations and reduced latency. No prefabs, scripts or manual manifest modifications are required to get started–simply enable VR and add Daydream as a targeted platform to begin making your own virtual worlds.
We have also made it easy to switch in and out of VR mode so that your applications can easily expand to the full Google VR audience and target Google Cardboard with full native support. Applications which target Cardboard will work on older devices so you can reach as many users as possible.
If you are interested in learning more about Google Daydream with Unity, see the Unite 2016 Daydream presentation.
Nintendo Switch support available
With the option to play docked console-style or handheld on-the-go, the Nintendo Switch offers a new opportunity for creators to think a bit differently about their games. Several Unity titles like Super Bomberman and Snipperclips presented at GDC on Unity booth have been released already. We are happy to announce that support for Nintendo Switch is now available. (Note that current support is based on Unity 5.5, Unity 5.6 support will be available during the 5.6.x cycle.)
Support for Facebook Gameroom
With Gameroom, Facebook has introduced an easier way for developers to bring premium and free-to-play games to the PC, and take full advantage of the CPU and GPU native power as a dedicated PC app separated from the news feed.
You can now build and export your projects optimized for native performance to either the new Facebook Gameroom desktop app for Windows as a native Windows player, or to Facebook.com using Unity’s WebGL support.
Everything you need comes integrated with Unity out of the box, from sharing content with Facebook friends to handling in-app purchases–you can even upload your builds to be hosted by Facebook directly from the Unity Editor. You can find more information on Gameroom here.
Experimental support for WebAssembly
In 5.6 we bring experimental support for WebAssembly, a new cross-browser technology designed to help improve the Unity WebGL experience. WebAssembly is a new, independent standard for the web. It is essentially a bytecode format that significantly reduces the size footprint of compiled code, unlike asm.js, which is a text-based representation. Compared to the currently used text-based representation, the bytecode format significantly reduces the size footprint of code compiled to asm.js. This leads to faster downloads of code, and more importantly, the ability to parse and compile the code much faster, using much less memory. This will improve the startup times, performance, and reduce their memory requirements–all of which are currently some of the more common issues developers face when targeting the WebGL platform.
Improvements to multiplayer
5.6 includes optimizations and stability improvements for existing Unity Multiplayer features. Notably, we've improved stability when running on less-than-reliable network conditions. Most changes are transparent and shouldn't impact current implementations of the network API.
In addition to changes that ship with the Editor, we've made improvements to Multiplayer documentation, created some new learning material, and began foundational work on new features. For more info, check out our recent blog post, which provides an update on the state of Unity Multiplayer, current and future.
New features for Unity Collaborate (Beta)
Unity Collaborate makes it easy for teams to save, share, and sync their Unity project. It’s easy to use so the entire team can contribute to the Project, regardless of location or role.It’s simpler to use than traditional version control (e.g. Git, SVN) so your team spends more time on what’s important–your game!
Based on customer feedback from earlier Betas, we’ve added some of the most requested features in 5.6, including Partial Publish, which lets users publish selected files. Previously, you’d have to publish all changed files at once.
With Ignore Files you are able to ignore files and directories in your project that you don’t want to push to the project, and the new Rollback feature enables you to make a previous version of your project the latest; especially helpful for undoing unwanted changes!