Search Unity

Feedback Package Manager for Store Assets doesn't remove obsolete files on Update

Discussion in 'Package Manager' started by crdmrn, Nov 9, 2020.

  1. crdmrn

    crdmrn

    Joined:
    Dec 24, 2013
    Posts:
    152
    That's somehow suprising, when updating an AssetStore package, the files that ere obsolete and are not present in the new version are srtill kept in the project, despite being greyed out in the import popup window. Why is that? D:
     
  2. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Hey there! Sincere apologies for the delay in reply. Wanted to enusre I got an accurate answer for you :)

    From what I understand, this has always been the behaviour of the Asset import.

    Unlike packages, imported assets are copied into user projects. They are modifiable by the user. Hence when reimporting a new version, Unity does not know if those existing file has been modified by the user or not and I believe it's safer to keep the files rather than automatically deleting them.

    If no modifications are done, users can very easily go to Assets, delete the original import and import again. That should remove the old imported files.
     
  3. Rabadash8820

    Rabadash8820

    Joined:
    Aug 20, 2015
    Posts:
    94
    Just ran into this myself. The External Dependency Manager package provided by Google for working with Android binaries in Unity (which in my case was installed through the Appodeal SDK) adds a version string to several of its DLL files. This means that every time I update the package, I'm essentially getting new, slightly modified versions of those DLLs. This leads to type conflicts and ambiguous names and all other kinds of terrifying compiler errors. In short, you basically need a thorough understanding of the internals of every package you import in order to ensure things won't break when you update...

    I realize that its largely up to asset developers to provide upgrade guides, and that there's no great way to handle this on Unity's end (as @UnityMaru note, they can't tell if you do want to keep an old file). Still, this situation makes it pretty obvious to me that "Assets > Import Package" was only ever designed for basic asset packs (packs of images, sounds, etc.), and cannot handle the versioning of real-world asset packs containing code and metadata in addition to assets. The Package Manager is a great step forward on Unity's part, and I really hope more asset developers will take advantage of it, cause ".unitypackage" files present an agonizing update experience...
     
    KristianHJ likes this.