Waiting for Unity's code in Unity.VisualScripting.Core.Editor.dll to finish executing

Been getting this message a lot lately. It gets stuck here until I force terminate the editor application and reopen the project.

It seems to trigger when I make code changes, return to the editor, and start playback (maybe a bit prematurely?).
Anyone know a workaround? I’m guessing it has to do with the background workers maybe?

7823817--990342--upload_2022-1-19_13-59-8.png

OS: Windows 10
Unity Editor Version: 2021.2.0f1
Visual Scripting Version: 1.7.5

Thanks

In Preferences try setting this to Recompile After Finished Playing.

Also, update UnityVS to 1.7.6. It’s a minor hotfix release so it shouldn’t impact preexisting content negatively. Your Unity version also seems to be a release candidate? Might be worth updating that too. The .0 releases always have issues.

Sadly it is still happening.

I tried all variations of the recompile settings.
Upgraded Unity to 2021.2.8f1 and Visual Scirpting to 1.7.6.

Still can’t tell when exactly it is happening but it seems to happen from around 5-10 code recompiles. Also seems unrelated to whether a State Graph or Script Graph is open. So something between code changes and just playing the game in the editor is triggering the loading window to get stuck.

I’m starting to get fairly certain this is the culprit. Only if I try enter play mode before this Ludiq Background Worker finishes loading, it gets stuck.


Workaround: wait for it to finish before attempting to enter play mode.

Hi, we are aware of some performance issues during domain reload. They are identified and logged in our bug base. We have planned time to tackle those problems but I’m talking about codes that take 200ms instead of 15ms for example, not 15s like I see in your screenshot. In the meantime, like @PanthenEye is suggesting try to migrate to the latest 2021.2 version (which should be 2021.2.8f1 by now).

Thank you @jeanedouard_unity Appreciate the effort.

However just for clarity so the team has all the information they need. I stated in this message, I am on the latest 2021.2 Unity version as well as the latest Visual Scripting version. Also you’ll see in the screenshot of my opening message that I waited nearly 9 minutes, meaning it cannot only be a performance issue but probably a logic issue. I get stuck completely there until a kill the process and restart Unity.

Thank you for the information but unfortunately this is still not enough for us to reproduce the bug. That sounds specific to your project. The best you can do is to report the bug using the Unity Bug Reporter and attach your project.

Stuck on this Please help it pops up as soon as i open the editor restarting didn’t work I’m using unity 2021

8065016--1041800--Screenshot 2022-04-20 235301.png

I had a similar behaviour a while ago (tho I usually don’t wait that long). This issue turned out to be AOTStubs.cs. Basically it’s a file that is generated when you build in IL2CPP and can easily have more than 60 000 lines of code (which can take some time to compile). The file usually gets deleted after you build, but if your build fails, it doesn’t get removed. Anyway, might be that, might not! :slight_smile:

It can also do that if you have some massive scriptable object / asset in your project

Try deleting your Library not your assets just library your program will open slower the first time idk if it will help

I get this behaviour regardless of it being a new or existing project. I click on a script file and its code appears in Inspector only to be followed by the message: Waiting for Unity’s code in UnityEditor.CoreModule.dll to finish executing. I have to kill the editor process to close the project.
I’ve tried various remedies that people have suggested and none of them works.
I can access the script file from File Explorer without difficulty, so the issue is definitely caused by Unity.

I got around the problem by changing from Visual Studio 2019 to Visual Studio Code in Preferences.

Yeah I don’t think there’s a way that works for everyone so I just worked around it and open the script in File Explorer. (it should be a .cs file by the way.)

Hey everyone,I was trying to fix this problem for almost 6 hours, because none of the google suggestions helped me (fix PlasticSCM, clear unity cache, etc.). So for anyone stumbling over this in the future:
In my case it had to do with a problem of the graphics card - thus editor wasent able to render the scene view and got stuck on editor load. I noticed it when i tried to run an old build and it wasent working either.

P.s. For anyone using a Surface Book 2: Unity tends to trigger 1 of the 2 graphics card to disable itself for some reason when going into power save mode and the returning into unity, (disabling the Nvidia card leaving you only with the graphics card in the screen/tablet part). The remaining graphics card can handle URP but not HDRP causing the editor to freeze on next load (while magically it still works as long as you dont restart unity)

@jeanedouard_unity if you could add an error message at some point on project load if there is a problem with i.e. rendering scene view giving you a hint on where the problem might be (as in my example with the graphics card) that would be a blast.

Thanks for the investigation. I’ll report your issue to the Editor team and if they open a public issue I’ll link it here.

Guys, u should off “Player projects”, that’s all. The way I solved this problem.8428668--1115829--upload_2022-9-10_1-39-40.png

Same problem now, out of no where, project was fine yesterday, booted up today, unable to open script. i even left it running for more than an hour waiting on unity coremodule… nothing… latest 2021 LTS…

Only thing i mananged was to remove the waiting timer from the popup…8508995--1133717--upload_2022-10-12_23-2-23.png

I keep getting this wait message now too (Vaupell)'s post.

had this happen once, did not record any info. I think it was on a new project that i had just created but not initialized but imported some player controller I was working on.

my fix was to delete the project and redo.
worked fine after that.
Was messing around during the install or somthin clicking play

Digging this up because I ran into a similar issue. For me it was PowerToys FileExplorer Addon.

I had an issue where if I selected a script file and tried to drag it onto a game object the editor would hang for ever.
If I selected the file in a File Explorer Window it would attempt to preview and then I would get a catastrophic failure from .NET.

Looking into the call stack pointed to PowerToys trying to preview the file.

I disabled it and my issue was resolved.