Version: 2022.2
Upgrade to Unity 2022.2
Upgrading to Unity 2021 LTS

Upgrade to Unity 2022.1

Note: Follow the advice in this section in release order.

To upgrade between LTS versions, such as 2019LTS to 2021LTS, you need to read the LTS upgrade guides between the versions, so go through the 2019LTS upgrade guide and then the 2021LTS upgrade guide.

To upgrade between regular (non-LTS) versions, such as 2019.4 to 2021.1, you need to read the LTS upgrade guides between those versions and then any minor version upgrade guides between the last LTS version and the version you want to upgrade to - so read the 2018LTS, 2019LTS, 2020LTS, and 2021.1 upgrade guides in that order.

This page lists changes in the Unity 2022.1 version which might affect existing projects when you upgrade from the 2021 LTS version to 2022.1.

Note: 2021 LTS is also known as 2021.3.

页面大纲

Articulation Drive forceLimit property has been fixed to accept force input instead of impulse

The Articulation Drive forceLimit feature was used as an impulse limit when it should have been a force limit. This made the force limit dependent on the fixedDeltaTime value.

If you have already adapted to the use of this value as an impulse, when you upgrade, your values for forceLimit in your Articulation Drive in the Articulation Body component will be incorrect by a large scale.

There are checks for when you open an older project. When you upgrade a project, Unity automatically divides the relevant values by the Time.fixedDeltaTime set in the ProjectSettings > Time page to avoid the incorrect configuration. This catches most cases where robots are simulated based on the project set Time value.

If you use custom time values from script to simulate your robots, then you need to manually correct these values.

Change to generated lightmap UVs

Unity’s UV generation procedure has changed. As a result, lightmaps may appear corrupted in projects that use the Generate Lightmap UVs option in Model Import Settings. To resolve this problem, rebake all of the lightmaps in your project.

This change only affects projects that use Generate Lightmap UVs.

Change to GradientField in the UI Toolkit

From Unity 2022.1, the color picker in GradientField doesn’t have HDR enabled by default. Existing projects that use GradientField now use a regular color picker instead of the HDR color picker.

To continue the use of a HDR color picker, you can enable it using the HDR property in GradientField.

UI Toolkit Numeric and Compound fields are available at runtime

The following fields are now available that work automatically at runtime:

  • DoubleField
  • FloatField
  • IntegerField
  • LongField
  • Hash128Field
  • RectField
  • RectIntField
  • Vector2Field
  • Vector3Field
  • Vector4Field
  • Vector2IntField
  • Vector3IntField
  • BoundsField
  • BoundsIntField

The UXML files in your projects don’t update and work upon upgrading. However, when you add new promoted types through the UI Builder, it breaks the backwards compatibility of UXML assets with older Unity versions. To keep the UXML assets backwards compatible, you need to use the old types (UnityEditor.UIElements namespace) in UXML files.

The Physical Keys option in Input Managed is enabled by default

The Physical keys option allows you to map key codes to the physical keyboard layout, rather than to the language-specific layout that may vary between users in different regions. For example, on some keyboards the first row of letters reads “QWERTY”, and on others it reads “AZERTY”. This means if you scripted specific controls to use the well known “WASD” keys for movement, they would not be in the correct physical arrangement (like the arrow-key arrangement) on an AZERTY-layout keyboard. With Physical Keys enabled, Unity uses a generic ANSI/ISO “Qwerty” layout to represent the physical location of the keys regardless of the user’s actual layout. This means if you specify the “Q” key, it will always be the left-most letter on the first row of letter keys, even if the user’s keyboard has a different letter in that position.

As of 2022.1 the option is enabled by default with intent of deprecating and removing old behavior in the future.

Added support for BatchRendererGroup

The BatchRendererGroup API was originally written for the MegaCity demo but was never fully documented or usable without a lot of implementation details. This API has been rewritten from the ground up and is fully documented and supported.

For information on how to use the new interface, see the BatchRendererGroup page.

Upgrade to Unity 2022.2
Upgrading to Unity 2021 LTS