I am having some wierd problem. I have just formated my computer and instaled new Windows 7. I can navigate trough scenes normaly without any difficulties but when i click play frame rate drops down to 1 or two frames. I have run profiler and noticed that CPU usage is 100% maxed out with overhead function while nothing else is going on! No Ram, Graphic or any other usage. I have created new test scene and it worked normaly. I dont know where is problem, but i get this problem only on my old ported scenes (same Unity version, but from Windows Vista), while any new scene runs fine.
I have also figured that it doesnt apply to all old scenes. Some scenes seem to run fine. Could it be some feature that is causing this?
It could literally be a thousand things…
Are you running expensive calculations at each frame? a script might be causing the whole game to wait for it to finish… In that case, it’s likely you’ll see the CPU usage max out, and everything else will be pretty much idle, since they have to wait until the CPU finishes the update cycle before they can move on…
I’d try disabling scripts, one by one (as far as that’s possible), to see if removing one of them makes a difference…
Some things that come to mind as possible culprits:
-
Procedural meshes with mesh colliders… PhysX needs to process the mesh before it can be used as a collider, and that will inevitably take a while…
-
Some calculation might be outputting really really small numbers, and those will cause slowdowns, due to the software having to handle these denormal values… That can happen if you’re manually interpolating values, for instance…
Well, that’s all I can think up right now… hopefully it helps
Cheers
it will always use 100% cpu unless you use the target framerate to limit the framerate as its target is the highest possible framerate
Hey thanks for help, i have removed old prefabs (with scripts) from map and replace them with new and it was working again. Harvester probably you were right, it was script issue where script wasnt properly compiled while moving project to new computer.