Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

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:
    302
    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:
    302

    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. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    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:
    365
    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:
    13
    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. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    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!
     
    Vaupell likes this.
  8. MaximeChaos

    MaximeChaos

    Joined:
    Apr 8, 2017
    Posts:
    13
    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. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    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
    Brianobino, tanliyoung518 and Alic like this.
  10. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    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:
    712
    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:
    3
    Still no fix ?
     
  13. MaxRoetzler

    MaxRoetzler

    Joined:
    Jan 3, 2010
    Posts:
    136
    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:
    14
    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:
    265
    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:
    712
    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:
    49
    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.
     
    mantisjoe likes this.
  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.
     
  19. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
  20. ilya-sharov

    ilya-sharov

    Joined:
    Jun 7, 2022
    Posts:
    2
    Bump.
    Same issue with ".vfx" and ".vfxoperator" files after scripts recompile. (2021.3.2f1)
    Reimporting affect on Assets and Package(Visual Effect Graph) folders.

    Removing Visual Effect Graph package can "solve" problem.
     
  21. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    The solution on my side apears to be be as simple as this.
    Delete all the .unitypackage files in your project.
    I did a test. I dumped some packages from InfinityPBR in the root asset directory.

    Then imported something.
    Boom 15minute load time.
    Removed them....
    Single import 30 seconds.

    This is in 2021.3.8f1
    And its pretty obvious why this would be so constant and common.
    With the 3 different render pipelines, the asset store wanting combability added to the files. but they all conflict, so people have to submit assets with attached .unitypackages. And in reading these comments I am seeing a pattern. Several of them are using HDRP or URP. So it falls in line with my observations.
    I however am not. My case came up when I was trying to save some space and move faster than the package manager. Since I'm comfortable with windows (expert frankly), I was just moving them into the project folder (onto my SSD) then deleting the asset store cache on C:\ to save space on my OS partition.

    So the cause for this seems to be rooted fairly deep in the engine in the asset refresh process. Obviously *I* can't trace that data stream, but...might be worth tell the team to look at the refresh process and maybe stop it from doing something weird when it sees files with that extension?

    In thinking about it, maybe its tied to the ability to drag a unitypackage file into the editor via OS, since the moment you do that it tried extracting it and importing? Perhaps a separate thread needs to be created to separate package manager in order to separate functionality and stabilize the process.

    This would also explain why the larger a project is how the loading process seems to take exponentially longer as it grows.

    @LeonhardP (apologies for the direct ping, however I'm not reporting a bug for investigation, more suggesting a investigation path into a long term bug, and I don't know how else to communicate to the devs directly.)
     
    Last edited: Oct 14, 2022
  22. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    The same way every major LTS has had the same NAV issue (first listed issue) for over 3 years... This company is more concerned about its resources spent on serving those that pay them most. I mean, its understandable ofc, thats big business. It is what it is.
     
  23. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    This one may not directly be a unity bug, it's hard to be sure. Running in 2023.16 LTS, and just had this problem out of the blue. The issue in question was importing an asset that used OnPostprocessAllAssets.

    Essentially, something about that usage caused the entire program to grind to a halt as that asset scanned every file quite slowly and exported to the log.

    I doubt that this is the sole reason this sort of thing can happen, and not everything that uses OnPostprocessAllAssets is evil (TextMeshPro uses it and seems to have no issues, same with Amplify Shader Editor).

    There are also some usages that are conditionally slow; I only use the TexturePackerImporter in a secondary project that has my 2D atlases in there, because it winds up taking forever whenever something changes with those atlases.

    Hope that helps someone.