Version: 2022.3
Language : English
Upgrading to Unity 2022 LTS
Upgrade to Unity 2022.1

Upgrade to Unity 2022.2

Page outline

Render pipelines

This upgrade guide describes how to upgrade to version 2022.2 of Unity’s built-in render pipeline. To upgrade to other render pipelines to version 2022.2, see:

To upgrade other packages, refer to the documentation for the packages you are using.

Enlighten Baked Global Illumination is deprecated

The EnlightenA lighting system by Geomerics used in Unity for lightmapping and for Enlighten Realtime Global Illumination. More info
See in Glossary
Baked Global IlluminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results.
See in Glossary
lightmapping backend is no longer available by default. When you upgrade a project to this version, Unity removes the Enlighten baking backend from the lightmapperA tool in Unity that bakes lightmaps according to the arrangement of lights and geometry in your scene. More info
See in Glossary
selection dropdown and substitutes a Progressive Lightmapper in every SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
where you’ve selected the Enlighten baking backend.

On Apple silicon devices, Unity substitutes the Progressive GPU Lightmapper for the Enlighten baking backend. On all other devices, Unity selects the CPU Progressive Lightmapper.

To continue using the Enlighten baking back end, open Edit > Project Settings > Editor and in the Graphics section of that menu, activate Enable Enlighten for Baked GI (Legacy). However, this option isn’t available in 2023.1 and later.

Minimum Bounces is not available in the Lighting window

The Minimum Bounces property of the Progressive Lightmapper is no longer available in the Lighting window.

When you upgrade a project to 2022.2, Unity resets the Minimum Bounces value to 2, the recommended number of minimum bounces for lightmapping. To change this value, edit the LightingSettings API property minBounces.

Unity’s default Gradle templates have changed

In 2022.2, Unity updated the default versions of all tools used by Android. The new versions are as follows:

Tool Version
SDK
Cmdline-tools component version 6.0
Build-tools component version 32.0.0
Platform-tools component 32.0.0
Platform (API level) 31 and 32 added by default
Tools component Removed
NDK r23b
JDK (OpenJDK) 11.0.14.1+1
GradleAn Android build system that automates several build processes. This automation means that many common build errors are less likely to occur. More info
See in Glossary
7.2
Android Gradle Plugin 7.1.2

The update to Gradle version 7.2 changed some build.gradle file configuration options. This required significant changes to Unity’s default gradle templates. Unity won’t attempt to upgrade custom Gradle templates to match the new format which means projects that contain custom template files might fail to build. To solve this, recreate any custom template files based on the new default template files.

For information about the build.gradle configuration option changes, refer to the Android Gradle Plugin release notes.

Navigation and Pathfinding is moving from the Unity core to the AI Navigation package

The package documentation is located here: https://docs.unity.cn/Packages/com.unity.ai.navigation@latest

If you have projects that were created with the Navigation feature in previous versions of the Unity engine you can do one of the following:

  • Continue to use your projects as they are
  • Convert your projects to use the new package

In either case, the AI Navigation package is automatically installed and added to your project.

To start using the new package you need to convert your project as follows:

  1. Go to Window > AI > NavMesh Updater.
  2. In the NavMeshA mesh that Unity generates to approximate the walkable areas and obstacles in your environment for path finding and AI-controlled navigation. More info
    See in Glossary
    Updater window, select which kind of data to convert.
  3. Click Initialize Converters to detect and display the types of data you selected.
  4. Select the data to be converted.
  5. Click Convert Assets to complete the conversion.

As part of the conversion process, the NavMesh Updater makes the following changes:

  • Any NavMesh that was previously baked and embedded in the scene is now referenced from a NavMeshSurface component created on a new GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
    See in Glossary
    called Navigation.
  • Any object that was marked with Navigation Static will now have a NavMeshModifier component with the appropriate settings.

If the NavMeshes in different scenes are baked with different agent settings then you need to create new Agent types to match those settings. To create the Agent types do the following:

  1. Go to Window > AI > Navigation.
  2. Select Agents.
  3. Create new entries and specify the relevant settings.

When you have created the new entries you then need to do the following:

  • Assign the newly created agent types to their respective NavMeshSurfaces in the Navigation created for that scene,
  • Assign the agent types to the NavMeshAgents intended to use that NavMesh.

To find the settings that were used for each existing NavMesh, select the NavMesh .asset file in the Project windowA window that shows the contents of your Assets folder (Project tab) More info
See in Glossary
. The NavMesh settings will be displayed in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary
.

If your project uses the NavMeshSurface, NavMeshModifier, NavMeshModifierVolume or NavMeshLink components defined by scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
downloaded from Unity’s NavMeshComponents GitHub repository , then remove those scripts and any associated files before you add the AI Navigation package to your project. If you don’t remove these scripts, you might get conflicts and errors related to these components in the Console. The new components mirror the same behavior as the old components do in your project except when using the following components:

  • The NavMeshSurface component now includes an option to use only the objects that have a NavMeshModifier in the baking process.
  • You can now specify whether or not to apply the NavMeshModifier component to child objects in the hierarchy.
Upgrading to Unity 2022 LTS
Upgrade to Unity 2022.1
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961