High CPU usage on Mac

Everytime I run my game I’m getting high CPU usage on the Mac Mini and the fan starts to get really loud. I thought it was because I have a lot of UI elements on the screen, but even when I delete everything and I’m just left with the camera and the events object, I can still hear the fan getting louder after a few seconds of running it, so I don’t understand what could be causing it. Any ideas?

So the fan running just means your CPU or GPU is hot and trying to cool down. I don’t know specifically about the CPU for the mac mini, but I do know that all macs but the newest iMacs contain GPU’s barely better than (and in some cases, worse than) the GPU in a high end phone (you don’t need anything higher for much other than games or high end photo and movie production, and optimizing for those is completely different than games anyway). As such, you’re computer’s possibly just running overtime trying to cool off.

As for the profiler, @Hexagonius is right, you should take a look at it. As for what you should be looking for, you should try to identify anything that takes up a lot of CPU or GPU processing power. The reason why there’s no difference between when the fan is quiet and when it’s active is because the heat is cumulative, so it’s being generated constantly, your fan just only goes on when it gets really hot, then it turns off again when the fan sufficiently cooled it down. So basically, just look for anything that uses a lot of CPU or GPU.

If you need help understanding the profiler, you’ll be happy to learn that Unity has excellent documentation on it: Unity - Manual: Profiler overview

Anyway, good luck!