Weird lag during play

Hello guys,

I’m working on a game but for the life of me I can’t figure out what exactly creates some kind of 0.2-1s lag from time to time (about every 2-3 seconds). The game has been optimized with anything I was able to think of, I even read a lot of online material and checked from textures, texture atlas, shaders, drawcalls, code, to sound and everything seems to be at the edge of optimization…

The game is a simple 2D game and I think the editor is supposed to handle this much processing without having to lag:
1554753--91411--$gamestats.JPG

Can anyone think of anything else I should check ? I’ve also reduced the Fixed Timescale, it’s about 0.033 now cause I didn’t need it to be faster and I thought it would help making the game faster.

I highly appreciate any help!

Kind regards,
Adrian

If you are using Unity Pro, have you checked the profiler yet? Try to see if these “lag-spikes” are showing up there, select a point in time when it occurs, and look for what is causing it.

Unfortunately I do not have Unity Pro. And as far as I understood, I’m not allowed to use it (even as trial) to finalize my product.

I’ve also disabled most of my scripts and just left the main logic of the game running, disabled most elements that were moving, it’s rather odd…

What you could do though is install the 30-day trial seperately, and profile your game there. Be careful though, both “Unity” installation folders have to have a unique name. See this document.

Thanks for the suggestion!