The short version: Everything seems to work just fine until I press “play”. Then I stare at a beachball until I hard terminate Unity. No error messages or actually any messages in the console.
The only thing I see is that it produces AssetImportWorker log files in the Logs folder. No error messages in them. But it creates plenty of them, right now its up to 23, with 3-4 new ones per minute.
Unity support can’t reproduce it. I can with high reliability. Might be machine specific. I’m now having this in the second project of mine. I’ve already deleted the Library folder. This is a project I’ve been working on for two years, so it’s not like it’s new or something. This started happening recently.
Very simple scenes (like my main menu, which has only UI elements) work. Of the 3D scenes I’ve tried so far, none have worked.
MacOS 10.14
Rest of the system continues working. Unity process is showing 70-99% CPU activity on one core while this happens, the activity monitor marks it red as “doesn’t react”.
I’m asking if anyone else has had this or similar problems and what, if anything, solved it for you.
I haven’t changed any code since last it worked. And I am very, very certain that I don’t have any endless loops that would run anywhere. Yes, it looks like an endless loop, but it’s not in my code.
Solving this with trial-and-error is going to be one hell of a joyride, because every time it happens I need to force-quit and completely reload the project, which by itself takes a few minutes.
How long would it take (particularly compared to making another post on the forum saying it would take too long) to delete every single CS file in your project and launch the 3D scene?
Obviously I’m assuming you use source control correctly. I take this as a given to actually do software engineering.
I’ve checked my own code, of course. If nothing else works I’ll go over it with a comb. But like I said, this is the 2nd project of mine this happened to, the projects share no code.
Note: Why would I DELETE my scripts when I can just selectively disable the game objects they’re attached to? tsk.
Attach a debugger to Unity and pause execution from the debugger while it is frozen. Then check where in the call stack the main thread is in Unity. You may find it is in your code (or maybe not).