Version: Unity 6 Preview (6000.0)
Language : English
API updater
Upgrade to Unity 2023.2

Upgrade to Unity 6 Preview

This page lists changes in Unity 6 Preview which might affect existing projects when you upgrade them from a 2023.2 version to Unity 6 Preview.

Page outline

Render pipelines

This upgrade guide describes how to upgrade to the Unity 6 Preview version of Unity’s Built-In Render Pipeline. To upgrade other render pipelines to Unity 6 Preview, refer to:

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

Buffer layout changes in Metal

The cross compilation of Unity shadersA program that runs on the GPU. More info
See in Glossary
to Metal shaders has changed with respect to buffer layouts. Any buffer that contains min16float, half or real types now have a different memory layout compared to previous versions of Unity.

You need to act only if you’re targeting Metal and using APIs that write raw data directly to buffers, for example:

You don’t need to act if you use only CommandBuffer.SetComputeFloatParam or Material.SetFloat.

More specifically, HLSL min16float, half and real inside buffers are always converted to 32-bit MSL float, whereas in previous Unity versions they could be converted to 16-bit MSL half, depending on the target platform.

If you have tested your shaders only on Metal platforms, check the buffers in the generated MSL code to ensure the layout matches the buffer data that’s accessed in C#. You can test whether this change impacts your shaders by adding #pragma metal_fxc_allow_float16_in_cpu_visible_buffers to your shader code and seeing if any visual artifact is fixed. If you notice a difference, remove this pragma and adjust your shader and C# code so that it works correctly without the pragma, to improve the cross-platform compatibility of your project.

To use native 16-bit floats in buffers, consider using the DXC HLSL compiler and adding #pragma require Native16Bit to your shader. But note that using DXC in Unity is still in an experimental stage.

Packages folder in the global package cache is no longer used

The global package cache contains several subfolders. One of those subfolders, packages, is no longer used by the Package Manager.

You need to act only if you have automation 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
or pipelines that interact directly with the global package cache’s packages subfolder, for example, if you use the UPM_CACHE_PATH environment variable. If so, you can remove the references. Unity doesn’t offer a direct replacement subfolder for packages. Packages are now extracted directly to the project cache.

If you no longer maintain projects created with Unity 2023.2, you can safely delete the packages subdirectory from the global package cache root. This operation is optional.

UPM_CACHE_PATH environment variable is no longer supported

Previous versions of the Unity Editor supported use of the UPM_CACHE_PATH environment variable to specify the absolute path to the location where you want the Package Manager to store the uncompressed contents of package tarballs.

You need to act only if you have automation scripts or pipelines that set path values in the UPM_CACHE_PATH. There’s no replacement for UPM_CACHE_PATH because packages are now extracted directly to the project cache. However, if you used to use UPM_CACHE_PATH, you can now use the UPM_CACHE_ROOT environment variable, which sets the root of the global cache. Note that the global cache root is the parent directory to the subfolder formerly associated with UPM_CACHE_PATH.

For more information, refer to Customize the global cache.

Default Android tools versions have changed

Unity has updated the default versions of the following tools used by Android. The default versions of NDK, SDK Command Line Tools, and SDK Tools remain unchanged. The updated versions are as follows:

Tool Version
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
8.4
Android Gradle Plugin 8.3.0
SDK Build Tools 34.0.0
SDK Platform Tools 34.0.5
Java Development Kit (JDK) 17

Version of 7-Zip included with the Unity Editor no longer supports zstandard compression

Previous Unity Editor versions included a 7-Zip fork that supported zstandard compressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression.
See in Glossary
:

Unity 6 Preview includes the regular upstream version 23.01 of 7-Zip for Windows, macOS, and Linux Editors. However, this upstream version of 7-Zip doesn’t support zstandard compression or decompression for .zip or .7z archives. It also lacks support for additional compression formats and hash algorithms added in the mcmilk/7-Zip-zstd fork.

If you have packages that use 7za or 7z.exe binaries that operate on archives using zstandard compression, use one of the following options:

  • Use an alternative compression format, such as .zip archives using the deflate algorithm or .7z archives using LZMA or LZMA2.
  • Provide your own binaries that support the required archive formats and compression algorithms.
API updater
Upgrade to Unity 2023.2