Search Unity

Bug Unity made full project reimport on every small change

Discussion in '2020.2 Beta' started by Jes28, Mar 1, 2021.

  1. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    716
    Just updated to Unity 2020 and already have reimported project about 5 times because every project chnage fires project reimport (all textures and meshes got reimported)

    - Update Unity - got reimport
    - Update URP - got reimport
    - Update TextMesh Pro package - got reimport
    - Added Backery to Project - got reimport
    - Updated Android logcat package - got reimport

    This is very bad workflow of new Unity. Is it known? When UT plan to fix this?
     
    dongch007 likes this.
  2. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    716
    And it looks like Unity AssetDatabase v2 dont work actually because All textures absolutely dont change by any of changes but fully reimported and dont get from already imported AssetDatabase.
     
  3. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    716
  4. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,708
    If some pacakge says "yo, I actually change the logic of how textures are imported, so please pay attention to me!", then a reimport is by design.

    Now, whether the packages you listed do have that logic or not, I don't know. Something like "android logcat" deifnitely sounds like it should not. Something like TextMeshPro might (whether for good reason or not, I don't know).
     
  5. dongch007

    dongch007

    Joined:
    Jan 8, 2014
    Posts:
    18
    https://forum.unity.com/threads/upd...ire-project-to-reimport.1072157/#post-6985475
    https://forum.unity.com/threads/why...eimport-of-all-textures.1065839/#post-6884252
    Seems even TextMeshPro dev dont know why.....
    There's no meta file changed after reimport. And for example delete Bakery or remove ProBuilder also trigger reimport.
    So I guess this is a bug. The same point maybe we all upgrate project from old version. I upgrade from 2017.4 to 2020.2.
    Can I konw which code maybe trigger reimport? Maybe I can search code to see where triggered.
     
  6. volblob73

    volblob73

    Unity Technologies

    Joined:
    Sep 19, 2017
    Posts:
    17
  7. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    716
    Last time I changed packages it was 2020.2.6f1
    You can see this in bug report
     
  8. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    716
    And reimported prefabs is not a problem for me they all took about 2 minutes
    Issue is reimported textures
     
  9. dongch007

    dongch007

    Joined:
    Jan 8, 2014
    Posts:
    18
    Last edited: Apr 18, 2021
  10. volblob73

    volblob73

    Unity Technologies

    Joined:
    Sep 19, 2017
    Posts:
    17
    I have had a look at this case and it is expected that textures get reimported. In the repo you add ProBuilder and this package is adding a texture preprocessor IconImporter.OnPreprocessTexture(). If you add a texture processor to you project, all textures will get reimported. This is the scenario @Aras described.
     
    LeonhardP likes this.
  11. dongch007

    dongch007

    Joined:
    Jan 8, 2014
    Posts:
    18
    Ok, I konw what you mean. If there's a new OnPreprocessTexture, all texture should excute this OnPreprocessTexture.
    But IconImporter only process ProBuilder's textures, other texture settings in this project are not modified, they should not do addition compress or any other operators even download from cacheserver.
     
    Jes28 likes this.
  12. volblob73

    volblob73

    Unity Technologies

    Joined:
    Sep 19, 2017
    Posts:
    17
    So it is the presence of a OnPreprocessTexture method that results in a dependency to all textures. It doesn't matter what textures that actually are being process inside the method. Work is being done to improve this, so that an asset processor like OnPreprocessTexture can be configured to only process assets in certain parts of a project.
     
    Jes28 and LeonhardP like this.
  13. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    716
    It will be good to also have fast reimport of textures, like if preprocessors change nothing to texture than do nothing and go to next texture
     
    dongch007 likes this.
unityunity