reCAPTCHA WAF Session Token

What’s New in Unity 2022?


Unity 2022.3 has finally been released, so the 2022 stream has moved into LTS. This article will cover many new features that are now considered stable and will have support for the next two years.

What Is LTS?

Unity’s release cycles have two main tracks. Long-Term Support (LTS) gets one main release per year. By the point it releases, most of the new features will have been in development for two years. And an LTS release will update with fixes (but not new features) for at least two years. LTS is the recommended version if you’re about to release your Unity game or app.

The other stream is the Tech Stream. Tech Stream releases have two main releases, with many smaller updates between them. These versions are full of the latest, but not always stable, features and are recommended for developers in the prototyping phase or if they need access to these new features.

At Kodeco, Unity tutorials will always be on the latest Unity LTS version at the time of writing unless covering a new feature available only in the Tech Stream.

So what features have come to the new LTS release? It’s time to look at the most significant updates for programmers and artists in this latest version of the Unity game engine.

What’s new in 2022 LTS for Programmers?

Unity programmers often look forward to improvements in how quickly projects compile and updates to the version of .NET that Unity supports. Some features are tested, withdrawn, and tested again several times before they become a regular part of the software. One such feature in Unity 2022 could be the most important addition to the engine ever.

ECS & DOTS

Probably the most important feature for developers in Unity 2022 LTS is the Entity Component System (ECS) release. Although it has been available as an experimental feature for some time, ECS is finally considered production ready.

ECS allows you to build with the full Data-Oriented Technology Stack (DOTS), which is a shift in design pattern from Object-Oriented development. ECS uses entities rather than GameObjects. By design, it gives control and determinism to memory usage. This allows you to simulate many entities simultaneously to create much larger game experiences than you can with the traditional GameObject approach.

ECS also combines with the Burst Compiler and the C# Job System to take full advantage of your target hardware at both the memory and CPU levels. The deterministic nature of ECS allows you to power Havok Physics for Unity in creating vast and complex physics simulations.

Note: Talking of the Burst compiler, in Unity 2022, even more of the Editor uses Burst, delivering shorter iteration times and a more responsive Inspector.

And finally, ECS can also power your multiplayer experience. With a data-driven approach, you can build multiplayer games that support more players, can rely on accurate data and have a faster iteration time than in a traditional object-oriented approach.

Adding Multiplayer Tools

Now, for the next big thing in Unity 2022. Multiplayer support is much less of a headache for developers now due to the suite of tools Unity is making available through Unity Gaming Services (UGS).

UGS supplies solutions for Server Hosting, Matchmaker, Lobby, Voice and Text chat and more. Then, there are the Netcode libraries.

Netcode for GameObjects allows you to add networking capabilities to GameObject & MonoBehaviour workflows with predefined components ready to use out of the box.

Netcode for Entities is a new package for Unity 2022 LTS that enables ECS in a multiplayer environment. It allows you to increase the number of players and support more interactive objects that open up better solutions for MMOs or online shooters.

For a sample of what Netcode for Entities can do, check out the Megacity Sample Project from Unity.

Netcode for Entities sample project, Megacity

Expanding XR Tools

The XR scene continues to grow with more and more devices coming to the market. Unity 2022 expands its support for the XR space by adding platform support for PlayStation®VR2, Magic Leap 2 and Meta Quest Pro. The XR Interaction Toolkit (XRI) gets an update with core interactions that work cross-platform, along with added hand and eye gaze tracking. Improvements to the device simulator remove the biggest pain point for XR development by allowing in-editor testing.

And that in-editor testing also comes to the AR side of development. AR Foundation 5.1 includes simulation, allowing you to use Play mode to simulate an AR device, which drastically reduces the time to test new features during development.

Apple Vision Pro

You might have heard Apple has entered the XR space! Apple announced the Vision Pro at Worldwide Developers Conference. During that presentation, Apple announced that it has partnered with Unity to enable developers to bring their Unity games to the Vision Pro. Although the device and the support aren’t out there yet, Unity 2022 will be the version you need to build on.

Build apps for visionOS with Unity

What’s interesting is that Unity apps will be able to move between Window, Volume and fully immersive modes with visionOS. What sort of unique ideas can developers come up with that harness the power of this feature?

You can watch some of the sessions from WWDC on using Unity to make immersive apps for visionOS. And you can apply for beta access to the new visionOS build platform here.

Programming Optimizations

Of course, alongside all these new toys, developers also get access to a host of upgrades to the engine itself. As mentioned above, the Editor makes more use of the Burst compiler. But further efficiencies are available to asynchronous programming with Async and await that yield in less time to get in and out of Play mode.

XR isn’t the only build platform to get an upgrade. Unity 2022 enables incremental builds for consoles, saving developers a ton of time. It also introduces support for DirectX 12 on Windows and Xbox, a free performance upgrade for any game using it.

Draw call performance comparison between DX11 and DX12

Profiling tools have also been upgraded, including a new Addressable Profiler Module for analyzing your addressable performance. And the new Memory Profiler window allows you to get a much better insight into the runtime memory usage of your application.

Memory profiling in Unity 2022

The WebGL platform also receives some optimization with improved memory management and diagnostic tools, native C++ multithreading and support for touch controls and texture compression on mobile devices.

What’s new in 2022 LTS for Artists?

Although the technical improvements for programmers unlock more productivity and performance, there are also many graphical improvements in Unity 2022 LTS. After all, if you have more performance budget, why not fill it with shinier graphics?

HDR Improvements

And the shiniest of graphics come from Unity’s High Definition Render Pipeline, or HDRP. HDRP has had a host of added features in this new version of Unity.

Volumetric Materials

The biggest wow factor from the demos comes from the new Volumetric Materials. These materials allow you to build realistic and procedural fog and volumetric effects such as ground fog, custom clouds, sand storms and smoke using the Shader Graph.

Volumetric materials built in Shader Graph

Upgrading Cloud Layers

Cloud layers are not new, but in 2022 they have had some upgrades. When combined with the physically based sky, sunlight color now has a much more significant effect on the clouds’ appearance. Volumetric cloud blending also allows you to blend seamlessly between different weather conditions.

Cloud layers react better to sunlight color.

Improving Water System

A personal favorite is the new Water system. Unity’s water effects were always good, but this new system blows everything else out of the water!

With this system, you can create seas, lakes and rivers with beautiful refractions, reflections and underwater effects. Combine with the above cloud effects, and you can make a very moody scene at sea. A new Assassins Creed Black Flag game, anyone?

Unity's new Water system just makes you want to go for a swim!

Full-Screen Shader Graph

A new master node is added to Shader Graph for a full-screen effect. This allows you to add custom passes, textures or post processes to the entire game view. There are several examples available in the HDRP sample content, including:

  • Custom Pass: Edge Detection, Sobel Filter, Object Highlight, Night Vision, Speed Lines
  • Custom Render Targets: Dynamic Custom HDRi for Night Sky, Animated Water Droplets
  • Custom Post Process: Colorblindness Filter

Full-screen shader graph frost effect

URP Improvements

Of course, not everyone’s making large-budget games! The Universal Render Pipeline (URP) supports a much wider range of platforms with a lower rendering budget. Unity 2022 LTS brings plenty of improvements to this pipeline also.

Smoothing Transitions with LOD Cross-Fade

Everyone has played those games where you see some trees or houses in the background pop into a much more detailed asset as you approach them. LOD, or Levels of Detail, is a common rendering technique to save performance budget when rendering objects in the distance by replacing their model or textures with a lower detailed version. This “pop in” effect happens when the model moves from one LOD to the next.

Unity 2022 introduces a LOD Cross-Fade mechanic, which blends different LODs as they change. The result is a much smoother transition that’s barely noticeable to the player.

LOD Cross-Fade eliminates the pop-in effect.

Rendering with Forward+

One of the main drawbacks of working in URP with Forward Rendering is a limit on how many dynamic lights you can use in a scene. Unity 2022 introduces Forward+, which culls lights spatially rather than per object. The result is a significant performance increase, enabling you to use many more lights than with the standard Forward renderer.

Forward+ Renderer enables more lights for your scene.

Sampling with TAA

Temporal Anti-aliasing (TAA) reduces aliasing problems such as pixelated or “jaggy” edges. In TAA, each pixel is sampled once per frame, but the sample is at a different location within the pixel. Pixels sampled in past frames are then blended with pixels sampled in the current frame to produce a final anti-aliased image.

Unity already has both Multi-Sampling Anti-Aliasing (MSAA) and Fast Approximation Anti-Aliasing (FXAA). Because TAA samples only once, it is, in theory, faster than MSAA. FXAA doesn’t sample previous frames, so although it’s faster than TAA, it provides a lower-quality result than TAA. You’ll need to experiment to determine which is best for your project.

Temporal Anti-Aliasing provides a balance between performance and quality.

Adding Decal Layers

Decals are a great way to add extra flavor to your scenes. Decals are projected onto meshes to break up repetitive materials and patterns. Previously, this projection applied to all meshes in a scene, which might have included a player character. Decal layers allow you to select meshes that ignore the decal projection.

Decal layers allow certain meshes to ignore the decal projection.

Adding Material Variants

Material Variants (also available in HDRP) are a welcome addition. Just as Prefab variants added great workflow optimizations, Material Variants aim to do the same. You can create templates and, from there, create variants that share the same base properties. Changing one of those properties in the base material will propagate through all the variants. So long as that property wasn’t overridden in the child material, it’s an Object-Oriented approach to materials that should be very useful!

Material variants will speed up your workflow

Where to Go From Here?

Unity 2022 LTS brings a host of exciting new features and improvements. Take a look at the showreel to see many of the features discussed here:

If you want to know what’s on the Unity 2023 Roadmap, you can see all the different categories and even leave your feedback over here.

And, of course, look out for more Unity tutorials coming soon right here!



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

WP Twitter Auto Publish Powered By : XYZScripts.com