Search Unity

Project upgrade to a new version of Unity: safe mode and packages

Discussion in 'Editor & General Support' started by sqallpl, Jul 23, 2021.

  1. sqallpl


    Oct 22, 2013
    I have a question related to the new safe mode. The answer could be obvious for people that upgrade their projects frequently but I'm not doing it very often.

    As far as I remember Unity always automatically updated Package Manager packages to compatible versions during the project upgrade to a new version of editor. Please correct me if I'm wrong.

    How it looks now with the safe mode feature? Is Unity still upgrading packages automatically during the project upgrade process? Does it happen before the script compilation and 'safe mode prompt' so the user can be sure that remaining errors (that cause the safe mode prompt) are not related to not updated/old packages versions?

    I'm wondering because I've found some posts about updating/installing packages in the safe mode.
  2. dorusoftware


    Jul 5, 2012
    First backup the entire project folder to a zip file. Then try uploading the project. See if it works. But take your time and do various tests, open scenes, see if it runs. See if assets from the store work if they have some custom menus. Because is not really clear immediately that all is good.

    If something goes wrong, which may happen quite often, delete the entire folder with the project that was changed and unzip the original folder so you don't lose nothing.
    Kurt-Dekker likes this.
  3. Kurt-Dekker


    Mar 16, 2013
    Listen to Doru... at a bare minimum do the above, or soon you'll be in here posting about how updating Unity completely screwed up your project.

    I'm not sure what order of operations happen vis-a-vis packages but I do know that errors are pretty commonplace, more common the more intervening versions of Unity you are "updating over."

    Think of updating your Unity not so much as an event but rather a process. To that end, please consider using proper industrial-grade source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    When I update, I branch and test thoroughly before I accept that branch. And I can reason about ALL committed changes.

    As far as configuring Unity to play nice with git, keep this in mind:

    Here's how I use git in one of my games, Jetpack Kurt:

    Using fine-grained source control as you work to refine your engineering:

    Share/Sharing source code between projects:

    Setting up the right .gitignore file:

    Generally setting Unity up (includes above .gitignore concepts):

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.