My game gets slower after several seconds

Desktop-20200804-19482202

Hello, everything was working fine half an hour ago. I took the ClimbLadder challange than something happend, now when I press play and started the game mode, unity gets slower like its freezing. I don’t what to, if you have any idea or any solution I will be very glad.

Hi,

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? Maybe there is an endless loop somewhere. Make sure the program doesn’t start a new coroutine each frame.

If you cannot spot any issue anywhere, open the Profiler, play your game until it becomes slow/laggy and check the list in the Profiler. If there is a suspicious entry like an entry with an increasing number of objects or a very huge object, that might be the issue.

Which version of Unity do you use?


See also:

Thanks for your answer. You are right. My foreground was creating endless clones, that was the problem. It’s because of my tile rules, I made something wrong probably. Now its working fine.

Good job on fixing the problem. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms