hi,i made a 2d game but its jerkish and laggy somethimes,below I provided images of my profiler below,please check it out and help me with the lag!! Thank Youalt text
Your scripts seem to be the problem. Optimize it by making everything in update functions a coroutine that doesn’t run every frame but a set interval (for an example I run checks every 0.15s for things like player location), don’t make your scripts run everything at one point but divide it equally during runtime.
Simply click on the spike. It’ll show you how many ms each object, script, physics need.
Just see which one needs the most.