Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Editor keeps reimporting assets without changes

Discussion in '2019.3 Beta' started by jrzancan, Jan 2, 2020.

  1. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    267
    2020.2.2f1 when i import even a small asset or script, untiy REIMPORTS everything..

    somesort of joke..

    upload_2021-2-19_0-32-11.png
     
    MaxRoetzler, Bitmore and ROBYER1 like this.
  2. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    267

    How did you find out which asset was using calling AssetDatabase.Refresh()
    I would like to find it, and comment the code out :D
     
  3. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    237
    imao, I sorry had to laugh. unbelievable, right? ^^ I have to deal with the issue the whole time. I feel like in the 90's
     
    wm-VR and Vaupell like this.
  4. Nexusmaster

    Nexusmaster

    Joined:
    Jun 13, 2015
    Posts:
    286
    Hi,
    I have the same problem with the reimport of the assets, but I don't want to bug report my 100GB project to unity. I would recommend unity to add a cancel button to the re-import process, if that is possible.
     
  5. MaximeChaos

    MaximeChaos

    Joined:
    Apr 8, 2017
    Posts:
    7
    Hi everyone.

    Same problem here, but my "Importing (busy for x:x)..." takes around 4 hours. It's been a week now that I'm trying to fix this problem. I just don't know what to do.

    Today I'm trying a somewhat desperate move: changing my indexing options on Windows so I could search for the file's contents, so I could look for "AssetDatabase.Refresh()" and "AssetDatabase.importasset" we never know. But I tried so many things prior to this, like deleting Library and temp. Library which took an entire day to rebuild (my project is quite big).

    I solved my problem.
    -Bought a new SSD
    -Reinstalled Unity on it
    -Transferred my project on it
    -Deleted every Unity caches (in %APPDATA%\LocalLow\Unity\)
    -Deleted the Library file in the project

    Then everything reimported, once done the project opened like a charm BUT once I imported ProBuilder from the Package Manager, Unity reimported the entire project again (which took around 1-hour thanks to the SSD). Once it reimported everything, it crashed again. Restarted the PC, launched the project, not once but twice since it crashed the first time. "Compile" message etc.

    And now it works. There is ProBuilder and PostProcess, I can import any unity package and it will not reimport everything. I can access Project Settings and Preferences without the Editor giving me an infinite compile loop. All clear! The only thing I didn't try yet is to build the project, but since everything works fine now, I'm not worried.

    Cheers!
     
    Last edited: Apr 28, 2021
  6. DreadTrain

    DreadTrain

    Joined:
    Apr 21, 2021
    Posts:
    1
    Still happening, using the latest version of Unity. Ridiculous.
     
  7. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    237
    Sorry, but our job as developers is not to fight around with something that has flaws, just because the company has a serious issue since 2019, if you are informed about that.

    1st a workaround is not a fix, it still includes the bug.
    2nd You de-escalate the issue for a real fix by sharing such steps
    3rd a workaround is NOT suitable for any serious production
    4th it's unity's job to fix that!
     
  8. MaximeChaos

    MaximeChaos

    Joined:
    Apr 8, 2017
    Posts:
    7
    It's not a "workaround", it's a fix since it 100% solved the problem.
    I work full-time (40 to 70 hours a week) on this project and since I did what I did, everything works flawlessly.

    I'm so sorry to share how I fixed my problem! Please accept my apologies for trying to help the community.

    You sound bitter and angry at Unity, and I couldn't care less why, but you should look at things objectively rather than blaming others for all the wrongs. Also if fixing problems is not your thing I would suggest you not approaching any developer position.
     
  9. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    237
    appendix for a better understanding:

    I like to support everything if it is not a core part of the software, because this work belongs to the core developers. What you are doing is supporting something that you can't really fix for the general and the good. Instead, you sit doggedly to make your contribution, which is more based much more on personality complexes on an empathic level than on ultimate help. You just show the company that they DO NOT have to set their team on. As I said, when it comes to something that makes sense to fix on our part, the community, actually the CUSTOMER, because I don't use Unity just for fun.

    Have a nice day!
     
    Last edited: May 26, 2021
    tanliyoung518 and Alic like this.
  10. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    705
    I've suddenly got this issue in my project and I don't know what to do, any package change seems to install all assets all over again. I haven't upgraded Unity or anything for a few months so the issue was within that version itself.

    I've deleted the library folder and Unity has reimported everything but now everything is pink and I am getting errors. The errors were clearly due to the package manager not installing all the packages like URP and Post Processing!
    Deleting the library to allow Unity to re import everything has often caused a 30% chance of some kind of corruption like this. I can't believe this is happening to me, why every few weeks i have to deal with some game breaking issue with Unity I don't even have a contact with this happens I have to wait weeks to get back from a Unity rep!

    It all started with Archimatix, Post Processing and Probuilder! Other people have had issues with these when importing them. Polybrush also had this issue but I got that after Probuilder so that's probably the root issue!

    What's making this worse is that the project is taking 100% cpu on the RPG Medieval Kingdom Asset!
    I've always had issues dealing with trying to view Unity 3D assets I've downloaded and them taking up massive library space. It's not a filesize issue the clutter and potential corruption increases exponentially with bugs like these where because I am using these large assets reimport and library rebuilds make it take way too long.
     
    Last edited: Jul 19, 2021
  11. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    705
    Update: So I found a cure. The cure is you must from now on not delete the UserSettings folder because this contains your packages from the Unity Registry that you have applied to your project. So that was why the URP and Probuilder and many other assets were missing during the library rebuild while the default packages were installed like JetRider-stuff which I had deleted!

    Once you do that you may still get some errors with post processing and I managed to find which one it was and reimported that package (right click asset and reimport). The other errors I was able to solve as well.

    So from now on when deleting the library folder also keep a backup obviously but keep the assets, project settings and usersettings folder. Personally I would have just put the user settings stuff in the project setting folder but whatever.

    When the project rebuilds you will likely still have some errors but they should be fixable with the right investigating like reimporting the trouble file which may not always be easily trackable.

    As far as I am aware the project is not reimporting stuff every change I make but time will tell.
     
  12. Krayt78

    Krayt78

    Joined:
    Jun 18, 2018
    Posts:
    1
    Still no fix ?
     
  13. MaxRoetzler

    MaxRoetzler

    Joined:
    Jan 3, 2010
    Posts:
    127
    2020.3.19, literally just spent the last hour reimporting the project twice. Once for moving some simple scripts (no AssetDatabase or AssetPre/Post-processor calls), once for changing their namespaces. Unity seems to be falling apart left and right at the moment. Editor is slow and lagging, triggering unnecessary reimports, and HOLD ON (...)!
     
    SilverStorm likes this.
  14. 3dHomer

    3dHomer

    Joined:
    Jun 6, 2015
    Posts:
    13
    I had this problem in Unity 2021.1.7f1 and solved it by resetting the repository (cleaning Library and other untracked files). Now it takes 20-30 seconds to open the project. When I had this problem, something was forcing unity to reimport almost the whole library at every start of the editor (even after successful reimporting).
     
  15. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    259
    2021.2.8f.... waited about 9 hours (a workday) for 300gb project to import, then unity went into safe mode over a script compilation error.

    After fixing the error it has now started reimporting everything again, so this means I wait another workday.
     
    Last edited: Jan 20, 2022
  16. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    705
    Out of curiosity what in the world reason are those 300GB assets?

    In my case removing Probuilder fixed the issue. Many people have complained about this happening with Probuilder.
    The good news is after removing it I found Umodeler and after getting used to it I can't work without it, never look back.
     
  17. Haxel0rd

    Haxel0rd

    Joined:
    May 20, 2021
    Posts:
    13
    For f**** sake Unity...
    This is 4 years old and still it's in current versions (2021.3.2f LTS),- just faced it!
    fix this now, it's costing us time !!! (how can this bug even exist for so long?!)
    Regards.
     
  18. skyemont

    skyemont

    Joined:
    Dec 1, 2020
    Posts:
    3
    Same / Similar issue in 2021.3.4f1.243

    I have some editor code that reads an array of ints on a monoscript and calculates a new single int value for it and puts that back on the same monoscript. very simple operation. I use the begin and end editing methods on the asset data base and set dirty on the monoscripts I change. Then after all that I call save on the assets database.

    It reimports them all... at about 1 per 1-2 seconds. I have 6K+ of them and it takes between 2-16! hours! yes 16. On the ones over 2 hours, it just sits and cycles.. and I have to kill it the next day after waiting the 2 hours.

    I've tried many ways. saving single at a time, etc. all slow.

    If I put in a max count between 100 and 500, I have it write a message at the end that says 'run again, hit max'... it saves those just fine and doesn't get in a 12+ hour cycle. but I have to run it 15 to 60 times with 2 to 10 minutes wait between. Over 500 and it risks the cycle of doom.

    I have found a hack that seems to work for now, but it's a bit unnerving.

    I added a single boolean property to my monoscript. bool StubClick;

    I run my editor code, and have it 'select' the entire list of assets it adjusted. They are all the same mono script so they multi-select just fine. I then simply toggle the StubClick property and unity seems to save them fine, and just like any other change. I'm always a bit scared it won't some day though. haha :)

    Not sure why it saves normal in one place and take hours in another.

    Any ideas would be greatly appreciated, but I figure getting info out there may help somebody. Not sure I suggest my StubClick option, but I'm desperate and am forced to use it. The max count option may be best for you.
     
unityunity