- Home /
Editor Way Laggy When in Play Mode on New MacBook Pro
Unity Editor works fine until I enter play mode. Then it becomes incredibly laggy regardless of what is in the scene. In a new scene with no geometry or logic running it is still laggy.
Why would this be the case? My thoughts are that it's either Unity is having issues with an Intel Iris Graphics card or that the card is the issue.
Unity works fine outside of play mode. Not sure what to make of it. How does Unity use the card different when in play mode? What could be the issue?
I've searched and only been able to find an answer for pc, where they say to force unity to use open gl. My understanding is that Mac only uses open gl. so doesn't seem to fit. Am I wrong there?
I'm running:
macOS Sierra 3.3 GHz Intel Core i7 Intel Iris Graphics 550 1536 MB.
I have build settings on on Mac OS X _x86_64
Any help would be appreciated. Thanks!
Do you display both scene view and game view at the same time in play mode? If so, have you tried showing only one at once?
I'm only showing one at a time. And the game is laggy in both scene and game views once I press the play button.
The artist on our $$anonymous$$m once had this problem during a gamejam. It turned out there was a GameController on a prefab which was numerous times in the scene and throwing hundreds of null reference exception. $$anonymous$$aybe the issue was code related. Logging in the console multiple times per frame can cause considerable lag, but maybe it could have been another performance issue.
If it happens again, maybe you could try deactivating gameobjects in the scene until it stops lagging to pinpoint the culprit.
[edit] I just saw your answer. That's weird.
Answer by dl_studios · May 03, 2017 at 10:57 PM
Weird. I went to Quality Settings, toggled off Anti Aliasing and it suddenly worked with no lag. I toggled Anti Aliasing back on and lag did not return. Very weird. I've dealt with the lag for two days and now it is gone suddenly. While the issue is resolved for me for now it still begs the question what is going on?
I faced the same problems and your solution has worked for me! Thanks
Answer by nickcernis · Oct 06, 2021 at 06:35 PM
Old thread, but I was having the same issue with Unity 2020.3.19f1 on a 16-inch 2019 MacBook Pro with an AMD Radeon Pro 5300M. Sharing the fix that worked for me in case anyone discovers this thread via search:
Exit play mode.
Visit Unity → Preferences. Change Interaction Mode from Default to Custom, but note the value next to Monitor Refresh Rate in the drop-down (in my case 16 ms).
Set the Frame Throttling (milliseconds) to a number lower than your monitor refresh rate. 12 worked well for me. If you go too low or too high you may see stuttering again.
I wrote it up in more detail here with before/after video if anyone needs more info or screenshots of the general settings.
Answer by Brian-Santos · Mar 19, 2018 at 04:46 PM
Unity seems to in fact be on drugs. I randomly started having a huge 1-2 seconds lag in the editor, could barely even click the buttons. Restarted my computer and all, lag was still there. I disabled all components in my Hierarchy, reenabled them, and now the lag is gone. ???
Answer by amamaenko · Oct 20, 2021 at 04:58 PM
It got broken again in Unity 2020.3.20f1
With this configuration: 16-inch 2019 MacBook Pro with an AMD Radeon Pro 5300M, I am getting jittering with default Interaction Mode, but also with anything that comes near my Monitor Refresh Rate (16 ms). Trying various Frame Throttling values, I feel to have found the sweet spot at 23 ms. No idea why this particular number, since my display works at 60Hz - apparently, some sort of a bug in Unity.