Stuck on Compiling script

Hello,

I can’t import assets anymore (with scripts) because Unity hangs on “compiling script”.
I reinstalled Unity, but it’s always the same.

Any help ? How can I reinstall a brand new Unity version ?

thx

Before you toss you attempt to reinstall Unity, try just opening a new project. If you are on Windows, hold the Alt key while you load Unity and then open a new project. If this works, you know the issue is with some resource in your current project.

I start with a new project, and it worked fine until I import (project was empty and clean) an asset with scripts (as character controller). I cleaned and reinstall Unity .. same issue ... stuck on 'compiling scripts' @ 50% I really don't know how to continu to test Unity. thx for your help

I'm confused. If you hold down on the alt key and start a new project it works? It only fails when you attempt to import a package? If so is it a specific package or will any package cause the problem?

So if you were to start with an empty project and then create a script, does the compilation of the script succeed? You might also try importing an asset package on one computer, and then taking the whole folder (and subfolders), and moving it to this computer to see if you can load the project. I don't have any specific knowledge of how to fix your problem, but I'm trying to figure out if the issue is specific to some assets/files or if your whole install is broken in some fundamental way.

fyi Unity bugs on all package importations.

6 Answers

6

Three years have passed and this issue still happens a lot.

In my case, sometimes I have to force quit the mono process and restart Unity. When that doesn’t help, logging out and in again (on Windows) is the only way to bypass the “compiling scripts” hell.

I remove Unity from my computer. Delete all preferences & files regarding Unity/MonoDev. Reboot and clean the PRAM.
Finally, Unity is working. end of story.

thx for your help

I have had this exact same situation on my Mac Book.

When I import the standard Water (Basic) package. Unity will give you the import package window… you click import and then Unity will give you the ‘compiling scripts’ window and sit at 50%… forever.

You will have to force quit the application. Then load Activity Monitor and force quit the ‘mono’ process listed which is using a high amount of CPU. Then next time you load Unity with Alt the key pressed.

There seems no way to load the Water package.

I had a similar, but not exactly the same issue. For any other google searchers, here is what I had/did:

Immediately AFTER compiling scripts, unity would hang for about 20 seconds, without any kind of response, then would come back to normal.
Changes scenes, settings and even code: all no help. But, different projects did NOT have the same issue.
Solution:
Created a new project. copy the contents of my buggy project’s asset folder into my new project’s asset folder.
Use new project: problem has vanished.

When Unity seems to not be giving the feedback you need, read the Editor Log. It will tell you exactly what is going on. If scripts are not compiling, sometimes showing hidden meta files will solve the problem.

try re importing all assets, under the assets tab

Try restarting your code editor. I use JetBrains Rider, and that did the trick for me.