PS4 frame skipping with A*4.0.11

Just tested my game on PS4 and have some pretty massive spikes at least every other frame. PC and NX versions work smoothly. I disabled A* and the problem disappeared. I’m using version 4.0.11. I’ve tried different thread settings, including “None”, and the problem still persisted. Needed to make some modifications to a few scripts so I hope it’s something I can address without updating. Let me know if you have any ideas what might be causing this. Thanks!


Edit: Just want to add that the skipping happens even when nothing is actively using A*. Seems to be dependent on whether the A* singleton is enabled or not.


Is it possible for you to run the profiler on the built target on the PS4?

Yeah I have a razor file. How should I send to you?

Isn’t that tool mostly a raw CPU profiler? I don’t think it will show things like relevant stacktraces in C# code? Is it not possible to attach the Unity profiler?

Also. You may want to upgrade to at least 4.2.4. There is this bit in the changelog that might be relevant.

Fixed a massive performance regression when using RVO together with IL2CPP and .net 4.6 due to changes in how the .net framework handles locking internally.

In the same version some other similar fixes for pathfinding and IL2CPP were also done.

Haven’t gotten it connected to the unity profiler yet, but I’ll work on that. Was afraid you might say to upgrade, but maybe would be for the best.

Here’s what I’m looking at anyway. Getting some kind of overlap that causes a frame to wait to sync.

And here’s a look at the other profiler.

I upgraded to 4.2.8 which definitely stopped the stuttering. Now to rewrite all my AI movement scripts :sweat_smile: I shouldn’t have modified A* in the first place, oh well, lesson learned.

1 Like

The upgrade also greatly improved the frame rate on the Switch build!

1 Like

I’m sure some git magic could take care of the update process.