Unity taking over 10GB of memory in task manager. I can't play my scene

My scene is really small. When I press play, Unity freezes “Hold on (busy for x minutes)” and it says Waiting for Unity’s code to finish executing. Eventually Unity crashes

Upon further inspection, Unity taking up 10,000+ MBs of the CPU in task manager

Just yesterday Unity was started perfectly, but suddenly this started happening. The last action I did was instantiate a class in Runtime. A simple: weapon = new Pistol(); line of code

Even upon removing that line this issue remains, so maybe it’s something else

What could be the issue?

Thank you!

Many things. Need more details.

Maybe run the profiler in edit mode with deep profiling. Could be an endless loop. We’d need to see the script that you changed.

It was an endless loop - thank you! :smile: