0
\$\begingroup\$

I need some help optimizing my game. I have spent last 3 days digging around with no luck. I have noticed really odd results in the unity profiler so, I have created a simple scene with just a cube and a camera, and again, really odd results. Could anybody have a look at this screenshots?:

enter image description here

enter image description here

enter image description here

You will see some significant peaks that make the frame time too high (30fps sometime or less). Scene hasn't any script, no coliders, no rigid bodies (notice the Physics simulate % in one of the shots).

Could anybody explain what is happening?

PD. Target platform is Android. This are taken from a Nexus 4 device. PD2. Somebody can argue that this is not a real scenario, but I have had this problems in a real game myself and wanted to show a simple example to expose the problem.

Thanks in advance.

\$\endgroup\$
  • \$\begingroup\$ For future reference, Win7 comes with a nice Snipping tool for capturing just a portion of the screen. Further, it looks like rendering stuff. Does it only happen on one machine? Have anything else running? \$\endgroup\$ – MichaelHouse Jul 19 '13 at 23:35
  • \$\begingroup\$ No, I don't have anything more running on the machine. I have tried with 2 different android devices with same results (I get occasional peaks). What do you mean by "it looks like rendering stuff"? With just a cube on the screen and no other client logic running do you think it is ok to have these peaks ruining a constant frame rate?. On the other hand, sorry for the screenshots issue. \$\endgroup\$ – Notbad Jul 20 '13 at 8:22
1
\$\begingroup\$

For What i can see :

  • You have some shader taking a lot of resources, do you have a custom shader?
  • you have a peak related to WaitForTargetFrameRate this looks a lot like a VSynch issue i had before, try disabling VSynch and you should get some relief already

Vsync can be disabled in Quality Settings

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.