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

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    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. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,118
    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

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    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:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

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

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

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

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up the right .gitignore file:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

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

    https://thoughtbot.com/blog/how-to-git-with-unity

    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.