Unity build runs absurdly slow on MacOS, even with NOTHING in the game, not even a skybox

I can’t for the life of me figure out why I’m getting such atrociously bad performance. I’ll create an empty project, remove the skybox, add nothing except for a custom FPS counter which is very lightweight and has worked fine on games I’ve built on PC, and when I run the game in editor I max out at 38fps. If I build the game I can almost get 60fps, but once I start adding literally anything it tanks.

MacOS 10.14.6 (Mojave)
2018 MacMini
3.2Ghz 6-core CPU
64GB Ram

I’ve tried Unity versions:
2019.1.8f1,
2019.4.16f1,
2020.2.1f1

…And the result is the same on all of them. I don’t think it’s a hardware problem, as I can run games built with Unity, like Hearthstone, and get 60fps no problem. Someone suggested it has something to do with “Metal” but I’ve tried with and without it and it doesn’t make a difference.

The profiler claims the bottleneck is Semaphore.WaitForSignal which implies it’s a GPU issue but Vsync is off, I mean the project is EMPTY, and I’ve never had any GPU problems on this machine while running other games.

I have recently completed a game made on Windows which never drops a frame, but if I transfer the project to MacOS and open it in Unity I can’t get above 11fps. I’ve tried exporting said game as a MacOS build and transferring it to the Mac but it simply refuses to run, regardless of whatever “chmod” bullshit I try.

I’m beyond frustrated with this. Does anyone have any ideas on this?

Stephen

2 Likes

If macOS refuses to run it because it’s been downloaded from the internet, it could be the same problem I’m also facing. Seems to be a signing issue. In case you’re interested in that, theres two threads about that:
https://discussions.unity.com/t/823307
https://discussions.unity.com/t/655057

About the bad performance… I’ve also seen that with the URP template recently, but it doesn’t happen in my main project, so I’m sorry I can’t help you there.

Good point about the rendering pipeline, though. I’m not seeing such performance problems in my projects either, but even in an empty project, you have already chosen a pipeline… @UmaroXP which one(s) have you tried?

I’ve only tried URP and a legacy project with LWRP which is allegedly the same thing but who really knows.

I’ll try HDRP but I was really hoping to use the Mac to develop for iOS so it may be pointless.

What’s your GPU usage look like? Is anything else running on the machine that could possibly be using up the GPU resources?

If I open Activity Monitor and pull up the GPU History window, when I run my empty scene (which consistently maxes out at 38fps), the GPU History window shows it’s almost maxed, like more than 90%. If I run my finished game, which is actually very lightweight compared to modern titles, the GPU is completely squished at 100% and my framerate is around 11.

With Unity closed, it hardly even registers. With it open but not running the game it sits at around 10%-ish.

I ran a game of Hearthstone to see how it compares, and it peaked around 95%-ish with average around 80%, but it was running on max settings and getting a smooth 60fps.

As a build, the empty scene gets up to 60fps, though inconsistent and the gpu still pushes 80%. Screenshot attached.
6714742--771946--Screen Shot 2021-01-11 at 6.19.36 PM.png

For what it’s worth, I don’t use URP, HDRP, or LWP. I use the standard (legacy?) rendering pipeline. And my projects seem to perform just fine. Chances are those other Mac games you reference are also using the standard pipeline. Maybe you should try that?

I just opened the “Sample Scene” HDRP thing, you know that sort of half finished construction site sitting in an empty void. It ran just as terrible, maybe getting 20fps, and also Unity itself was running super slow.

Yes. HDRP is junk. But what about the standard pipeline?

Result is the same.

The plot thickens, however. I’ve made an iOS version of my game, using Unity in Windows, exported the xcode project to the mac and side-loaded it onto my iPad and it runs very consistently at 120fps. So I don’t think my game is the problem.

Tautvydas-Zilys do you have any insights as to why I’m getting such terrible performance on Mac? I just updated to the newest MacOS and it didn’t change anything.

I’ve no idea. What resolution are you running at? Did you try using the profiler? Any chance your mac is overheating?

Resolution is 2560 x 1440. Profiler says the bottleneck is Semaphore.waitforsignal.

it’s not impossible that the Mac is overheating but unlikely. It’s only a couple months old and the results are the same even if I try right after booting up in the morning and it’s only 60 degrees in the room.

I am seeing a similar issue. I have reproduced this in a very simple project with a couple dozen static Cubes.
Unity 2020.2.2f1, MacBook Pro 2015.

Majority of frame is spent waiting for Present.
Looking at the Render thread it is spending most time inside Camera.ImageEffects … PrepareRenderTarget.

Here’s screenshot of Profiler where you can see it takes 32 ms on render thread:

I have not tried older versions of Unity yet, but sounds like it happens there as well.

My hardware spec:

Can we get this looked at asap? Happy to send over my project if that helps.

Here I did a capture with XCode Instruments, within another test where Camera.ImageEffects takes significant amount each frame. You can see below a few frames in sequence.

@Tautvydas-Zilys let me know if there is any additional information I should grab.

Can you report a bug on this? If you could work with our QA to get them to reproduce this, then we would be able to investigate what’s going on here.

1 Like

@jazzay22 if anything good comes from that bug report could you let us know here too?

3 Likes

Hi guys. I’m running the 3d Game Kit on a Macbook pro 2015 retina with i7 and 16gb of ram, graphic card integrated. It’s impossible to work on it. How do you have solved the problem with Mac? Too slow! I must solve that…
Thank you to the one is going help me.

Want to follow this thread. I’m seeing disaster on Mac. Runs fine in the editor, but a build is just brutally slow. Set the default settings down to “High” and it’s better, but still so slow and eventually just grinds to a halt. I’ve been testing builds on WebGL and itch.io and it runs fine there.

I don’t think we have any known issues. Did you try using the profiler?