Unity 2018.1 marked the start of a new cycle with two major innovations at the core. Together, the Scriptable Render Pipeline (SRP) and Shader Graph give artists and developers more power, while the C# Job System, Burst Compiler and ECS make it possible to take advantage of multi-core processors without the programming headache. Unity 2018.2 builds on these innovations and adds several new features. This post provides an overview of the most important updates in 2018.2.
While you go through the list of new features, you can download Unity 2018.2 here or via the Unity Hub.
One of the goals for Unity 2018.2 has been to build on the Scriptable Render Pipelines (SRPs) in order to enable next-level rendering. Another focus area has been to develop a range of features and improvements that will help you succeed in mobile. Let’s take a brief look at what we’ve done in these two areas before going into more detail on the entire release.
Unity 2018.2 optimizes the performance of the Lightweight Render Pipeline (LWRP) and enhances the High Definition Render Pipeline (HDRP) to help you achieve high-end visual quality, including multiple improvements to the Shader Graph, which now supports both pipelines (please note that both the LWRP and HDRP are currently in preview.)
We also added support for managed code debugging on iOS and Android, Windows, macOS, Nintendo Switch, UWP and PS4 for IL2CPP, and we started adding some mobile optimizations to the Lightweight Render Pipeline (LWRP).
For Android projects, 64-bit (ARM64) support gets its final release, and we now let you add Java code to your Unity plugins folder without needing to create libraries in advance.
Finally, several new 2D features are available as Preview packages, including the Vector Graphics importer and Pixel Perfect. The Vector Graphics importer makes it easier for you to work with SVG graphics, and Pixel Perfect makes it easier for you to achieve a perfect retro look across different resolutions on a wide range of devices.
To get an overview of all the improvements in this release, read on.
In 2018.1, we introduced the Scriptable Render Pipeline (in preview), which places control of powerful new rendering pipelines in the hands of artists and developers. This release includes the following SRP updates:
Speeds up CPU rendering
The SRP batcher is a new Unity engine inner loop that speeds up CPU rendering without affecting GPU performance. It replaces legacy SRP rendering code.
Games that use Physically Based Rendering (PBR) often have many different objects and meshes that share the same shader and keywords for all the different materials per object. The SRP batcher gives games that use PBR a major CPU speed boost.
The SRP batcher works with the High Definition Render Pipeline (HDRP) and Lightweight Render Pipeline (LWRP), with PC DirectX-11, Metal and PlayStation 4 currently supported.
Reduces player build time and data size
Player build time and data size increase with the complexity of your project because of the increased number of shader variants.
With scriptable shader variants stripping, introduced in 2018.2, you can manage the number of shader variants generated and therefore drastically reduce player build time and data size.
This feature allows you to strip all the shader variants with invalid code paths and/or unused features, and to create shader-build configurations, such as “debug” and “release,” without affecting iteration time or maintenance complexity. Scriptable shader variants stripping can lead to a massive increase in team efficiency. See this blog post to learn more about how scriptable shader variants stripping is implemented in the Unity shader pipeline architecture.
Delivers high performance
The Lightweight Render Pipeline (LWRP) delivers high performance, which is especially useful for lower-end hardware, performance-hungry applications like XR, and platforms, such as mobile.
LWRP improves performance and optimization further with Optimized Tile utilization. LWRP will adjust the number of load-and-store to tiles in order to optimize the memory of mobile GPUs. It also shades light in batches, which reduces overdraw and draw calls.
Basic LWRP is currently supported on all VR platforms, however, it will not support Multisample anti-aliasing (MSAA) until 2018.3.
Please note that LWRP is currently not supported for handheld AR, like ARCore or ARKit, or HoloLens or Magic Leap devices. New product plans will be communicated at a future date.
First shipped as a Preview in 2018.1, the High Definition Render Pipeline (HDRP) prioritizes high-definition visuals targeting primarily high-end platforms, such as PC and consoles.
In 2018.2, we have gone further to help you achieve high-end visual quality. However, it is important to note that the SRPs are still Previews, and consequently not yet recommended or supported for production. Improvements include volumetrics, glossy planar reflection, Geometric specular AA, and Proxy Screen Space Reflection & Refraction, Mesh decals, and Shadow Mask.
Volumetrics: Volumetric fog receives lighting from all supported light types except area light. It is also possible to control the density of the fog locally with density volume.
Glossy planar reflection: Planar reflection now supports glossy reflection, which means that it takes into account the smoothness of the material.
Geometric specular AA: Mesh with dense numbers of triangles can cause specular aliasing. In order to address this, there is now an option to reduce and limit the amount of aliasing.
Proxy Screen Space Reflection & Refraction: This feature lets you use proxy volume (volume approximating the scene boundary) to perform screen-space reflection and refraction. While it is not as accurate as using the depth buffer, the runtime cost is lower.
Mesh decals: This allows you to use mesh for decals in addition to projector decals.
Shadow mask: Previously, this feature in HDRP used the Distance Shadowmask mode (dynamic shadow fade to shadow mask at maximum shadow distance). With 2018.2, it is now possible to select per light if the dynamic shadow only renders a non-lightmapped object (corresponding to the shadow mask mode of the built-in pipeline). So unlike with the built-in pipeline, HDRP allows both shadow-mask modes to be enabled at the same time, and you have a per-light control for the built-in Shadow mask mode.
Additionally, we have added limited Shader Graph support so you can visually create shaders, and we are working to improve overall stability and performance. Limited support means that only a subset of HDRP features is available in the Shader Graph. There are currently no advanced material features (SSS, clear coat), and tessellation is not currently available either.
Lastly, we have added a shader stripping feature, which makes it possible to avoid compiling shaders that are not required when building a player. This results in a much faster build time.
Please note the HDRP is not currently supported on any AR or VR platforms. Support for these platforms is scheduled for 2019. New product plans will be communicated at a future date.
There are several improvements to the Progressive Lightmapper, which came out of Preview in 2018.1.
The configurable falloff in the Progressive Lightmapper enables you to match physically plausible falloff curves when baking your lights. Previously, the observed intensity of spot and point lights was greatly affected by the range value of the light. This is not physically plausible because the falloff distance (or attenuation) of a light in reality is determined by its intensity.
This feature allows the Progressive Lightmapper to decouple range and intensity by having a distance falloff that is tied to world-space distance. While legacy falloff is still supported, we now also support linear falloff, distance squared, and distanced squared with attenuation to zero at the range limits. Inverse square falloff is enabled by default in HDRP in order to match real-time lighting, and enables physical units for light intensity.
We used to allocate the emission and albedo in unique lightmap space for all our lightmaps. However, since instances generally share the albedo/emission characteristics, we now support generation of those maps per unique instance instead. This reduces the amount of memory that the Progressive Lightmapper uses, enabling you to bake even larger scenes.
For performance reasons, it is often preferable to split larger scenes into smaller “sub-scenes” that can be loaded or unloaded during runtime depending on visibility. This is known as “additive loading” or a “multi-scene” setup.
The supported workflow that Unity offers when generating GI lighting for multi-scene configurations allows the user to load all required sub-scenes and then have them generate lighting for this complete scene hierarchy. The output is a LightingData.asset that stores lightmaps, Precomputed Realtime GI and probe data. This is associated with the first scene that is loaded, which can be inferred to mean the “master” scene.
Scenes that are then loaded/unloaded during runtime derive their lighting data from the LightingData.asset associated with the master scene. In this scenario, the Lighting Settings of the sub-scenes are irrelevant. However, scenes can also be baked individually or loaded in a different order depending on intent. This can lead to scenes having incompatible Lighting Settings and mismatched lighting data. For example, skyboxes may differ, lightmap resolutions may vary or mixed lighting modes could be different.
Previously, Unity did not warn the user of this problem and this has led to some confusion when results were not as expected. Unity now generates a warning to inform the user that there is an incompatibility. Then explicit information about any incompatibilities is provided for easier debugging and validation.
We also exposed the “per light” option to the cull lightmapped shadowcasters function (scripting API only), allowing it to be used by the HDRP.
In 2018.1, we introduced Shader Graph as a Preview package, in order to enable you to build shaders visually. Instead of writing code, you can create and connect nodes in a graph network. Each node in the graph gives instant feedback on the changes, and its ease-of-use means that even new users can be involved in shader creation. For this release, we made several improvements, including:
Shader Graph now supports the HDRP with both PBR and Unlit Master nodes. Shaders built with the Shader Graph work with both the LWRP and the HDRP.
You can now modify vertex position via the Position slot on the PBR and Unlit Master nodes. By default, the input to this node is object space position. Custom inputs to this slot should specify the absolute local position of a given vertex. Certain nodes (such as Procedural Shapes) are not viable in the vertex shader. Such nodes are incompatible with this slot.
The settings for master nodes are now available in a small window that you can toggle on and off to change various rendering settings for your shader.
You can now edit the Reference name for a property, making it far easier to reference your shader properties from script. To do so, select the property and type a new name next to Reference. If you want to reset to the default name, right-click Reference, and select, Reset reference.
In the expanded Property window, you can now also toggle the Exposed checkbox.
You can now change the path of Shader Graphs and Sub-Graphs. When you change the path of a Shader Graph, this modifies the location it has in the shader selection list. When you change the path of the Sub-Graph, it will have a different location in the node-creation menu.
With this node, you can change graph output depending on the face sign of a given fragment. If the current fragment is part of a front face, the node returns True. For a back face, the node returns False. Note: This functionality requires that you have enabled two sided on the Master node.
This adds gradient functionality via two new nodes. The Sample Gradient node samples a gradient with a given Time parameter. You can define this gradient on the Gradient slot control view. The Gradient Asset node defines a gradient that can be sampled by multiple Sample Gradient nodes using different Time parameters.
This change expands Unity’s support for Texture types via two new property types and four new nodes. These allow you to define and sample Texture 3D and Texture 2D Array type assets in Shader Graph.
This adds a new node for LOD functionality on a Texture 2D Sample. Sample Texture 2D LOD uses the same input and output slots as Sample Texture 2D, but also includes an input for level of detail adjustments via a Vector1 slot.
You can now see the generated code for any specific node. To do so, right-click the node and select Show Generated Code. The code snippet will open in the code editor that you have linked to Unity.
This release includes experimental support for running the Editor on Vulkan for both Windows and Linux. Vulkan is a new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.
In this release, we have added support for streaming texture mipmaps into memory on demand (i.e. only when they are required).
What is the benefit?
You can enable this feature to reduce the texture memory requirements of a Unity application.
How it works
When this system is enabled, Unity will only load the higher resolution texture mipmaps when meshes are close to an active camera. The high-resolution mipmap data is kept in memory while the overall texture memory is within a user-defined budget. If loading a new texture miplevel would cause the texture memory to exceed the budget, then the higher resolution mipmaps, on meshes furthest from the camera, will be freed from memory.
Speeds up initial load time
The initial scene load time may also speed up due to the reduction in texture data that is first loaded (i.e. loading just the lower resolution mipmap levels). The initial load-speed improvements are platform-dependent.
The Texture Mipmap Streaming system gives you full control over which mipmap levels are actually loaded into memory. Normally, Unity will load all the mipmap levels that are stored on disk, but with this system, you can take direct control over which mipmap levels are loaded.
This system also trades a small amount of CPU time for potentially large GPU memory savings.
Simple to enable and manage
The feature is simple to enable via Quality Settings, where you can define, per texture, if each should be streamed by the system. You can query the metrics to identify the texture memory usage, while still being able to see the memory savings.
Various settings can also be adjusted to control the system so it balances the memory savings and CPU cost, and to allow you to prioritize some textures over others (e.g. character textures over environment textures).
AnimationPlayables now allow users to write their own C# Playables to interact directly with animation data.
Users can also write multithreaded C# code to control the AnimationStream data used by the PlayableGraph, which also allows integration of user-made IK solvers, procedural animation, or even custom mixers into the current animation system.
Here are the improvements in 2018.2:
Support for eight UVs
This allows you to use more custom data than ever before.
MinMaxCurve and MinMaxGradient
It’s now possible to use these types in your custom scripts, outside Particle Systems to match the style used by the Particle System UI.
Linear Color Space
Particle Systems now converts colors into linear space, when appropriate, before uploading them to the GPU.
Emit from Sprites
We’ve added two new modes to the Shape module, in order to emit from a sprite or SpriteRenderer component and match particle emission perfectly to the visuals of the sprite.
There are two new APIs for baking the geometry of a Particle System into a mesh: BakeMesh bakes the particle geometry, and BakeTrailsMesh bakes the Trails module to a mesh.
Show Only Selected (aka Solo Mode)
A much-requested feature, this has been made more discoverable and accessible alongside all the other previewing controls on the Scene View Overlay, with the Play/Restart/Stop, etc., controls.
ETC Texture Support
Shaders that use separate alpha textures can now be used with particles, when you use sprites in the Texture Sheet Animation module.
Try the Pixel Perfect Preview package to stay true to your pixel art vision. The Pixel Perfect Camera component will help you get perfect, crisp pixels – regardless of the screen size – by making all the calculations automatically for you.
Your sprites will even benefit from the feature when they are in motion or rotating, always keeping a sharp pixelation, without having to add interpolation to smoothen the edges as illustrated below.
Traditionally, the distance between the center of a Sprite Renderer and the axis is used to determine which sprite would be rendered last and therefore appear at the front of the image.
With this release, you can use the pivot point instead of the center of the sprite as the reference point in the various sorting methods, such as arranging by distance to the top of the screen. For example, in top-down RPG games, you need the bottom of the sprite to determine the rendering order of the sprite.
The new pivot-point configuration lets you set criteria that better suit your game.
You can now build Hexagonal Tilemaps. This includes support for flat-top and point-top Hexagonal Tiles, which are especially useful for making strategy games or digital board-games.
This feature lets you import Scalable Vector Graphics (SVG) directly into your projects. The SVG Importer allows you to create sprite assets with a very small file size that will retain their quality at any resolution.
The SVG importer supports the most common features of the SVG 1.1 specification, such as gradients, fills, clipping paths, dashed lines, and rounded corners. Vector graphics sprites imported in this manner are supported by the Unity 2D tools.
Once an SVG file is imported, the vector data is tessellated into triangles and a sprite is generated. This sprite can then be used by the 2D system. The source for the SVG Importer can be found in the Editor folder of the package.
Get the SVG Importer as part of the Vector Graphics Preview package from the Package Manager.
The vector graphics APIs can be used to create and manipulate vector constructs directly in code. The source for the Vector Graphics APIs can be found in the Vector Graphics namespace under the Runtime folder.
You can use the Vector Graphics API to create or manipulate vector data directly in the code. The new 2D Atlas API lets you write custom tools to create or update atlases. For example, you could create personalized character textures using the player’s profile picture, or you could optimize the atlas based on the player’s configuration.
You now have the ability to add .java (as well as .cpp and .a) source files to Unity project plugin folders. These files will be recognized as Unity plugins and compiled into the APK without requiring the user to build libraries separately in Android Studio. The plugin code remains a part of the Unity project, eliminating the need to create a separate Android Studio project.
We have removed the 5.0 version of standard assets from the Installer in 2018.2 and are working on replacement packages for each part of the former prototyping pack. The first package (Standard Assets: Characters) will be available as a Preview soon after the 2018.2 release. It will contain a First-Person and Third-Person Controller integrated with Cinemachine, as well as a prototyping environment built with Probuilder. For details, watch for a blog post on the subject in the coming weeks. For those of you who need the legacy 5.0 package, it will remain on the Asset store.
Unity Hub (v1.0), which will be released soon, is a new tool that was designed to streamline onboarding and setup processes for all users. It provides a centralized location where you can manage your Unity Projects, and it simplifies how you find, download, and manage your Unity Editor licenses and add-on components.
Since our initial release, we’ve been working hard at fixing bugs and fine-tuning the experience. In the past six weeks, we’ve already published more than four releases that have been automatically downloaded and updated on our user’s machines. Here’s a few things that have will ship with Hub 1.0:
In case you missed the beta release back in January, you can read about it in the blog post here.
This release includes new features that make artists and cinematographers feel more confident and in control when working in Unity, including the following:
Unity Recorder 1.0, which will be released soon, comes with many updates that give users a simple way to manage and record animation clips, videos, and image sequences from the Editor:
The Unity Recorder v1.0 will be available on the Asset Store.
RakNet, our former networking feature, was deprecated in 5.1, and has been removed from Unity 2018.2. That means that any project that uses RakNet will not work with this release.
The Addressable Asset System makes it easier to manage all the things that make up your game, like prefabs, textures, materials, audio clips, animations, and so on. As projects grow, the number of assets increase too. Users have to reference them intelligently or else everything in your game, from local memory to content distribution, will become difficult to manage.
Your content-distribution strategy, in particular, will be harder to manage because asset references are typically resolved at build time, and users often face heavy refactoring in order to make modifications.
The new Addressable Asset System makes it easy for your team to scale as your game increases in size. It separates the three primary concerns of runtime asset management: referencing, packaging, and distribution. This simplifies referencing content, whether it’s on the local machine or distributed online via CDN, because the content is automatically loaded and unloaded for better memory management. We also provide profiler tools to further optimize memory usage. Ultimately, this results in faster iteration time for you.
The new Addressable Asset System ships separately. It is available as an add-on via Package Manager and is now in Preview.
If you have a 4K monitor, you can now enjoy High-DPI scaling support on both Linux and Windows in the Editor and support for per-monitor display scale factors on Windows.
Since Unity 2018.1, we have been supporting two scripting backends on the Universal Windows Platform (UWP): .NET and IL2CPP. With this release, we are deprecating support for the .NET scripting backend. The goals for this deprecation are twofold.
Easier to port games to UWP
The first goal of this deprecation is to make it easier for you to port games to UWP. Much of the developer pain associated with porting games to UWP in the past has been due to differences in API surface area and differences between the .NET Native and the Mono and IL2CPP runtimes Unity uses on other platforms. This change will ultimately make it easier for most developers to port games to UWP.
Helps us offer better support
The second reason for this deprecation is to make it easier for us to support you by fixing issues efficiently. Because the .NET scripting backend is completely different from the runtimes we use for all other Unity platforms, it has been challenging for us to maintain a consistent quality-level, relative to the rest of Unity. This deprecation will ultimately enable us to spend less time maintaining the .NET scripting backend, and more time working on the features and issues that are most important to you.
IL2CPP has the same .NET API surface as all other Unity platforms, and IL2CPP has had support for accessing WinRT types and APIs for some time now. So with the addition of the IL2CPP-managed debugger in 2018.2, the developer experience on IL2CPP is now on par with, and superior to, what the .NET scripting backend provides.
IL2CPP has been the default since 2017.2, so we expect most users will have no issues with this. However, if you have not yet tried using IL2CPP and you do experience any issues, please be sure to file them. We plan to end backend support for .NET scripting in 2019.1.
With our new high-performance multithreaded system introduced in 2018.1, we’re rebuilding the very core foundation of Unity. The new system will enable your games to take full advantage of the multicore processors currently available — without the programming headache. This is possible thanks to the new C# Job System, which gives you a safe and easy sandbox in which to write parallel code. We are also introducing a new model to write performant code by default with the Entity Component System (ECS), and the Burst Compiler to produce highly optimized native code.
With great performance by default, not only will you be able to run your games on a wider variety of hardware, you’ll be able to create richer game worlds with more units and more complex simulations. You can learn more here.
In 2018.2, we added several improvements including Reactive system samples. The Reactive system will enable you to respond when there are changes to component state and emulate event-driven behavior. You can learn more about Reactive systems by watching Joachim Ante’s Unite Berlin talk on the subject.
We will also be providing a number of examples and documentation on how to implement Reactive systems using ECS.
During the latter half of the year, we will be providing small Unity game samples created by Unity users and converted to ECS by us.
With this release, burst compiling for ECS is available on all editor platforms (Windows, Mac, Linux), and you will be able to build AOT for standalone players (Desktop, PS4, Xbox, iOS, Android, and Nintendo Switch).
As we progress towards 2018.3, we will continue to focus on ECS performance, release a Preview of determinism, and support more .NET C# language constructions (DllImport, constant arrays, foreach, etc.).
We are aiming to bring the Burst Compiler out of Preview in the 2018.3 timeframe.
IL2CPP-managed debugging is now available, enabling developers to use their preferred debugger to find and fix errors, even when using the IL2CPP backend.
All debugging features will be supported for Visual Studio (with Visual Studio Tools for Unity) and JetBrains Rider on standalone, PlayStation 4, mobile platforms and Xbox One planned for later.
Unity 2018.2 ships with dozens of bug fixes related to the scripting runtime, thanks to all of the great feedback we have received since the .NET 4.x.
With this release, ARM64-bit support for Android, based on IL2CPP technology, drops the Preview label. This version provides you with performance benefits because 64-bit Android apps and your games will be able to address more than 4GB of memory space.
You now have the option of splitting the target architecture (x86, ARM 32, ARM 64) into multiple APKs rather than making a large one. Then, for stores that support this option (like Google Play), you’ll only have to download the APK with the relevant architecture.
One of the biggest barriers to acquiring new players is the hassle of the install process.
Downloading and opening an app takes time and results in many users giving up before experiencing your game.
With Google Play Instant, players can try a 10MB instant version of the game without having to install it first. This plugin simplifies the conversion of a Unity-based Android app into an instant app, which can be deployed through Google Play Instant.
The plugin is available as a project on GitHub to use with Unity 2017.x and newer versions.
The plugin’s features include:
We now fully support modern encryption (TLS1.2) across all platforms from .NET 4.x and UnityWebRequest APIs. This includes automatic verification against platform-specific certificate stores.
On Xbox One and PS Vita, which don’t provide access to system store validation, an embedded CA store is used for validation.
As previously announced, we have completed the deprecation of UnityScript with this release. See Richard Fine’s blog post from last summer for detailed information.
In general, we made this decision because as we continue to upgrade the Scripting Runtime and the version of C# we support, C# will enable greater possibilities:
We also stopped accepting new Asset Store packages that contain UnityScript code, and we have removed packages with UnityScripts.
Finally, we provided a UnityScript-to-C# Automatic Conversion tool. There are a few of these available, but we weren’t happy with the approaches they use. Since we learned a lot about operating on UnityScript code when we wrote the Script Updater, we decided to apply that knowledge and build our own solution. You can download it here.
For those interested in using Visual Studio Code as IDE, we have developed, and we maintain, the Visual Studio Code Debugger for Unity extension, which is available as Preview.
HoloLens Holographic Remoting allows applications to leverage the power of a local desktop machine to offload rendering and processing at runtime. We think our Automotive and AEC customers will find this feature particularly useful. Learn more on how to get started.
If you were a beta tester, you helped make the release of 2018.2 possible. So thanks for trying out all the new features and providing great feedback.
The 25 Unity Gear Set sweepstake winners
We are currently reviewing all the 2018.2 beta sweepstakes entrants and will soon send gift vouchers by email to the 25 winners. (To qualify for a prize, you had to submit a bug entry that had not been previously reported, that we could reproduce, and that we acknowledged was a bug.)
Be part of the next beta
If you are not already a beta tester, consider becoming one. You’ll get early access to the latest new features and you can test if your project is compatible with the new version. You also get to participate with some of the leading experts in the Unity community, help influence the future of Unity, and get a chance to win cool prizes.
You can get access simply by downloading our open beta test. By joining, you won’t just get access to all the new features, you’ll also be able to help us ensure the highest quality software.
As a starting point, have a look at this guide to being an effective beta tester. If you would like to receive occasional emails with beta news, updates, and tips & tricks, please sign up below.