Space fighter combat with gripping missions against an invading alien warrior race. Dodge hazardous asteroids and minefields. Vanquish enemy fighters and massive ships using skill, fortitude, and hi-tech weaponry.

Post tutorial RSS Upgrading a Project to a Newer Unity Version (2019 LTS to 2020 LTS Edition)

The best way to upgrade your Unity project to a newer version of Unity.

Posted by on - Intermediate Management

I've recently gone through the motions of upgrading from unity 2019 LTS to Unity 2020 LTS. Unlike various other project upgrades, this wasn't quite so simple. This is the approach that I found worked best in my case and I hope it will be of use to you.

Preparing your Unity Project Folder for Upgrade

  1. Ensure your current Unity Project is compiled and runs.
  2. Make a note of all packages used in your project with Package Manager.
  3. Backup your Unity Project (If you never do this you are just asking for trouble). Whenever I backup my Unity Projects I include all folders except the Library Folder, as this gets autogenerated by Unity and can get quite large depending on your project size (i.e. multiple GB's!)
  4. Close Unity.
  5. Go to the Unity Project folder in File Explorer (or whatever OS equivalent, just not inside Unity)
  6. Delete all files and folders except for the Assets and Project Settings folder. All other files and folders will be autogenerated by Unity when upgrading the project.

Prepared Unity Project Folder


Upgrading to new Unity version

  1. Use the Unity HUB to download the version of Unity you intend to use (in my case Unity 2020 LTS)
  2. Change the Unity Version against your project to the version you downloaded
  3. Open the Project

Unity HUB

Fixing Errors in Safe Mode

  1. If there are any compilation errors, enter Safe Mode if prompted.
  2. Review the Console for errors, fix any related to your code and ignore anything related to Unity Assets you may have added to your project

Safe Mode


Safe Mode

Package Manager

At this point any, remaining errors should be related to missing packages.

  1. Open Package Manager (Window > Package Manager) while still in safe mode
  2. Install all packages used in your project. As you install each Package your number of errors will start to reduce

Package Manager

Importing

Once you get this progress screen, go make yourself a Coffee.

Importing


A word on Unity Assets

Something I found out with an asset I use called Rewired. It brought up a little warning saying I needed to use a version of Rewired for 2020. Despite that, I had already had the latest version downloaded and installed (with Unity 2019!).

I'll admit my ignorance here, but it looks like an asset is downloaded specifically for your Unity version when using Package Manager. Despite re-installing Rewired, it appears to be using the 2019 variant of the Unity Package. I want the 2020 variant since I'm now using Unity 2020 LTS!

  1. Locate and delete the folder for the downloaded Asset Store packages (or delete all the folders inside)
  2. In Package Manager, download and install each package again. Pay attention to any specific instructions provided by the various Asset authors. Though generally, deleting the asset folder (as long as it doesn't hold any specific settings in that folder) is a safe way in most of my cases

Unity Asset Location in Windows


Testing

Run Mode

Test your game in run mode to check all worked out and no problems.

If you find Serialized assets are missing references you manually defined you can always copy the backup of your Unity Asset folder from before the upgrade. Just ensure Unity is closed while you do this.

Build your project and check for any errors

This was important for me. There were build errors, yet Unity produced the EXE just fine. Running the game, I found there was a problem where the game could not change to the required resolution resulting in a crash.

Shader Errors


Shader Errors

To confuse me, despite the message there was no undeclared identifier when checking the shade files. In fact, even the line number were wrong. Where to go from here?

  1. Find the Shader in the Project folder with the error
  2. Right-click on the shader file and select Reimport
  3. Repeat for each shader with an error. You could try Reimport All, but for me, there were only a few errors making the process quick

Shader Reimpot


The End

With a little luck and care, you should now have your project fully upgraded and working without any issues. If you are unlucky, I won't be able to help as I'm only covering my experience to benefit others. Though do comment below with how your upgrade process turned out and how you fixed any unexpected issues I didn't encounter during the upgrade process.

Follow me on Twitter @abs_territory

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Profile
Icon
Absolute Territory
Platforms
Windows, VR
Developer & Publisher
Digitum Software
Engine
Unity
Contact
Send Message
Release date
Game watch
Follow
Tutorial
Tags
unity, upgrade
Browse
Tutorials
Share
Related Games
Absolute Territory
Absolute Territory Combat Sim
Related Engines
Unity
Unity Commercial
Related Groups
Digitum Software
Digitum Software Developer & Publisher
Indie Devs
Indie Devs Hobbies & Interests with 1,674 members
Unity Games
Unity Games Hobbies & Interests with 1,826 members