This page lists any changes in 5.6 which might affect existing projects when you upgrade from earlier versions of Unity.
For example:
Changes in data format which may require re-baking.
Changes to the meaning or behavior of any existing functions, parameters or component values.
Deprecation of any function or feature. (Alternatives are suggested.)
Script serialization errors no longer work
The script serialization errors introduced in Unity 5.4 and described in detail in this blog post, will always throw a managed exception from 5.6 onwards.
Behaviour in Unity 5.5 is the same as in Unity 5.4.
PlayerSettings.apiCompatibilityLevel deprecated
This is now a per-platform setting. Use PlayerSettings.SetApiCompatibilityLevel and PlayerSettings.GetApiCompatibilityLevel instead. PlayerSettings.apiCompatibilityLevel will continue to function, but it will only affect the current active platform.
Lighting changes
Directional specular lightmapA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary has been removed.
As a consequence, LightmapsMode.SeparateDirectional has been removed. Use LightmapsMode.CombinedDirectional instead.
Here are the prefered ways to get specular highlights in Unity 5.6:
For direct specular, stationary lights with real-time direct lighting provide high quality specular highlights in all modes but the subtractive one. Please see the Mixed Lighting documentation in the online lighting section of the 5.6 User Manual.
For indirect specular, use Reflection ProbesA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary, Screen Space Reflection (SSR), or both.
Mixed mode lighting has evolved
Mixed mode lighting in Unity 5.5 has been replaced with stationary lighting modes in Unity 5.6. This implies a lot of changes, and we advise you to carefully read the Lighting Modes documentation, and in particular the Stationary Modes draft documentation in the online lighting section of the 5.6 User Manual which details the newly available options.
Projects from pre-Unity 5.6 will be upgraded to Subtractive mode (see the Subtractive Light Mode in the online lighting section of the 5.6 User Manual. This is the closest match to the Mixed lighting from Unity 5.5.
However this mode is the lowest quality mode for Unity 5.6, so try other modes to see if they are a better fit for your projects. We highly recommend the ShadowmaskA Texture that shares the same UV layout and resolution with its corresponding lightmap. More info
See in Glossary (see the Shadowmask page and the Distance Shadowmask page in the online lighting section of the 5.6 User Manual, especially if you were using the now-defunct Directional Specular lightmaps before).
The default for new Unity 5.6 projects is Distance shadowmaskA version of the Shadowmask lighting mode that includes high quality shadows cast from static GameObjects onto dynamic GameObjects. More info
See in Glossary mode. (See the Distance shadowmask page in the online lighting section of the 5.6 User Manual).
Light probesLight probes store information about how light passes through space in your scene. A collection of light probes arranged within a given space can improve lighting on moving objects and static LOD scenery within that space. More info
See in Glossary
In Unity 5.6 you can no longer choose whether direct lighting is added to Light Probes from the lighting window. This now happens automatically based on the lights types and the stationary modes. This ensures that direct lighting is not missing and that there is no double lighting on dynamic objects using Light Probes, greatly simplifying the process.
New GPU instancing workflow
You must now check the new Enable Instancing checkbox for all Materials used for GPU instancing. This is required for GPU instancing to work correctly.
Note that the checkbox is not checked automatically as it’s impossible for Unity to determine if a Material uses a pre–5.6 ShaderA program that runs on the GPU. More info
See in Glossary.
An upgrade error is also imposed on SpeedTree Assets to help you regenerate the SpeedTree Materials, so that you can have Enable Instancing checked.
Note: The newly introduced procedural instancing Shaders (those with #pragma instancing_options procedural:func
) don’t require this change because Shaders with the PROCEDURAL_INSTANCING_ON
keyword are not affected.
Particle systemA component that simulates fluid entities such as liquids, clouds and flames by generating and animating large numbers of small 2D images in the scene. More info
See in Glossary changes
Custom Vertex Streams
in the Renderer Module may now require you to manually upgrade your Particle Systems, if you use the Particles/Alpha Anim Blend
Shader. In this situation, it is sufficient to simply remove the duplicated UV2 stream.
This is required because, in some cases, the duplicated stream is needed to maintain backwards compatibility, so there is no fully reliable auto-upgrade solution. The Normal and AnimFrame streams are also not required, but causes no problems if they exist. The fixed Particle System setup should look like this:
Secondly, the upgraded Emission Module will cause Animation Bindings attached the Burst Emission to be lost. It will be necessary to rebind those properties.
Animator change
Animate Physics: RigidbodiesA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary attached to objects where the Animator has Animate Physics selected now have velocities applied to them when animated. This will give correct physical interactions with other physics objects, and bring the Animator in line with the behaviour of objects animated by the Animation Component.
This will affect how your animated Rigidbodies interact with other Rigidbodies (the Rigidbodies are moved instead of teleported every frame), so make sure to verify that your Animators with Animate Physics are behaving as you expect.
Dynamic batching 2D spritesA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
You should use dynamic batching in upgraded projects that contain 2D sprites. This avoids significant sprite rendering performance issues on devices with Adreno and Mali chipsets.
To use Dynamic Batching, open the Player window (menu: Edit > Project SettingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary, then select the Player category). Open the Other Settings panel and, under the Rendering section, enable the Dynamic BatchingAn automatic Unity process which attempts to render multiple meshes as if they were a single mesh for optimized graphics performance. The technique transforms all of the GameObject vertices on the CPU and groups many similar vertices together. More info
See in Glossary property and disable the Graphics Jobs (Experimental) property. Note that these are the default settings for projects created in 5.6.
Graphics Jobs should not affect dynamic batching, but can sometimes cause unexpected behaviors on platforms that use Vulkan and DirectX12.
NUnit library updated
The Unity Test Runner uses a Unity integration of the NUnit library, which is an open-source unit testing library for .NET languages. In Unity 5.6, this integrated library is updated from version 2.6 to version 3.5. This update has introduced some breaking changes that might affect your existing tests. See the NUnit update guide for more information.
* 2017–05–19 Page amended
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.