Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Inconsistent script imports when updating packages

Discussion in 'Asset Importing & Exporting' started by dKleinTriCAT, Dec 4, 2023.

  1. dKleinTriCAT

    dKleinTriCAT

    Joined:
    Jul 2, 2019
    Posts:
    21
    Main Issue:
    The import of scripts sometimes breaks when updating packages since our upgrade to unity 2022 LTS. This breakage can only be fixed by deleting the library folder and doing a full reimport. The more often you update packages and the bigger the project the more reliably the breakage occurs. We have managed to reproduce the breakage in a fresh unity project with very minimal dummy packages, but it was very unreliable so there is no clear culprit identified yet. The broken scripts seem to be limited to scripts in packages. It is quite the problem and costs each of our employees several hours per week, while also forcing us to do a complete reimport of each project for our nightly and weekly builds every time. There are two tickets existent for this for a while, but I am not aware of any communication via those so far (one is IN-60092). There are also already several threads discussing this issue in greater detail, which I'll link below.

    I am just referencing all of this here as the other threads are in the package manager and accelerator subforums and while both those components play into this problem (the breakage happening when updating packages and the accelerator distributing the corrupted import artifacts to all other users) my guess is that the Asset import subforum is the most likely to reach someone at unity who is actually able to put all that together and look at the core of the issue => the breaking/inconsistent imports. I've also attached two versions of an imported script (fixed and broken) as an example of the breakage.

    Other posts discussing the same underlying issue:
    https://forum.unity.com/threads/cac...s-which-then-causes-asset-corruption.1516361/
    https://forum.unity.com/threads/package-manager-behavior-change-in-unity-2023-2-0.1518538/
     

    Attached Files: