Upgrade to Unity 2023.1
Upgrade a project from 2022 LTS to 2023.1.
Read time 4 minutesLast updated 23 days ago
This page lists changes in Unity 2023.1 which might affect existing projects when you upgrade them from a 2022 LTS version to 2023.1.
Page outline
- Render pipelines
- Gaussian Filter Radius properties from are now floating point values
LightingSettings - Improvements to light probe energy conservation
- Enlighten Baked Global Illumination is no longer available
- Android: Java class UnityPlayer needs to be renamed to UnityPlayerForActivityOrService
- Android: UnityPlayer java class no longer extends FrameLayout
- FetchFirstCompatibleTypeUsingScriptableRenderPipelineExtension replaced by GetDerivedTypesSupportedOnCurrentPipeline
- CustomEditorForRenderPipelineAttribute and VolumeComponentMenuForRenderPipelineAttribute deprecated
- Changes to Android Gradle templates usage
Render pipelines
This upgrade guide describes how to upgrade to version 2023.1 of Unity's built-in render pipeline. To upgrade other render pipelines to version 2023.1, see:
To upgrade other packages, refer to the documentation for the packages you are using.
Gaussian Filter Radius properties from LightingSettings are now floating point values
The Progressive Lightmapper includes a Gaussian option among its Advanced filtering options (Lighting Window > Lightmapping Settings > Filtering > Direct Filter > Gaussian). The Radius control for Gaussian filtering now supports decimal increments, such as 0.5. Previously, this control only supported integer steps (1 to 5).
As a result of this change, these properties are now deprecated in the C# API:
int LightingSettings.filteringGaussRadiusAOint LightingSettings.filteringGaussRadiusDirectint LightingSettings.filteringGaussRadiusIndirect
The floating point replacements for the deprecated properties are:
float LightingSettings.filteringGaussianRadiusAOfloat LightingSettings.filteringGaussianRadiusDirectfloat LightingSettings.filteringGaussianRadiusIndirect
You can call one of the deprecated member functions to round the Gaussian filter radius to the nearest integer.
Improvements to light probe energy conservation
Light Probes are now as bright as lightmaps. Previously, Unity’s Light Probes were only 94% as bright as they should be. For this reason, objects lit with light probes appeared a bit darker than objects lit with lightmaps. Because of the subtlety of this change, it is possible that many users won’t see a noticeable difference.
Should you prefer the old appearance, you can achieve it in the following way:
- Bake light probes.
- Use C# to get a copy of the array LightmapSettings.lightProbes.bakedProbes.
- For each SphericalHarmonicsL2 instance, multiply coefficient 0 with 16/17.
- Write your copy of the array back into LightmapSettings.lightProbes.bakedProbes.
Enlighten Baked Global Illumination is no longer available
The Enlighten Baked Global Illumination lightmapping backend is no longer available.
When you upgrade a project to this version, Unity removes the Enlighten baking backend from the lightmapper selection dropdown and substitutes a Progressive Lightmapper in every Scene 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.
Enlighten precomputed Realtime Global Illumination is still available and is supported up until Unity 6.
Android: Java class UnityPlayer needs to be renamed to UnityPlayerForActivityOrService
The Java class has been replaced by two new bridge classes, and . These new classes both derive from , but public methods such as and have moved from specifically to .
UnityPlayerUnityPlayerForActivityOrServiceUnityPlayerForGameActivityUnityPlayerdisplayChangedwindowFocusChangedUnityPlayerUnityPlayerForActivityOrServiceIf you extend the default Unity activity and use the class, you might encounter compile errors. In this case, rename to .
UnityPlayerUnityPlayerUnityPlayerForActivityOrServiceAndroid: UnityPlayer java class no longer extends FrameLayout
The Java class no longer extends . If you need to access , call the function on the instance.
UnityPlayerFrameLayoutFrameLayoutgetFrameLayoutUnityPlayerFetchFirstCompatibleTypeUsingScriptableRenderPipelineExtension replaced by GetDerivedTypesSupportedOnCurrentPipeline
RenderPipelineEditorUtility.FetchFirstCompatibleTypeUsingScriptableRenderPipelineExtensionCustomEditorForRenderPipelineAttribute and VolumeComponentMenuForRenderPipelineAttribute deprecated
CustomEditorForRenderPipelineAttribute and VolumeComponentMenuForRenderPipelineAttribute are now deprecated. Use CustomEditor and VolumeComponentMenu instead. To restrict the choice of pipeline when these attributes are active, combine them with SupportedOnRenderPipelineAttribute and specify a RenderPipelineAsset type. If you want to activate an SRP attribute that does work with the Built-In Render Pipeline, use SupportedOnRenderPipelineAttribute without parameters. This provides a unified workflow for both attributes when there’s a need to activate them on a specific pipeline.
Changes to Android Gradle templates usage
A new API to modify the Android Gradle project was introduced. The API can be used to replace the old Android Gradle templates workflow. Templates will still work as before if the new API is not used.
To use the new API a Templates Upgrader can be used:
- Open Android Player Settings.
- Go to Publishing Settings > Build.
- Select Upgrade templates to C#.