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 sceenshots?:
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.
Yup, I noticed the vsync issue, I have disabled it. what about the camera.render peaks? they are really inconsistent too :(. I’m a bit shocked about unity team not explaining this or giving hints about this scenarios because they seem pretty common in the forums. The problem is that there are no answer to the questions.
94.3% in Shader.SetPass looks really odd to me. What shaders are you using? Can you remove materials until you locate the material that causes this behaviour. Physics.Simulate sounds odd if you have literally no physics in the scene.
Um, what’s shocking about that? You’ve posted on a community site. The Unity devs try and help when they can. I don’t think you should expect a Unity employee to respond to every thread on this site. And expecting one inside 9 hours somewhat, um, shocks, me. If you need assistance inside 8 hours, we do have support services you can purchase. (Oh, and look, it’s a Saturday morning, and I’m not at work, but still responding to you.)
Well, this are problems that I have seen around since 2011 in other posts. Previously I was refering to that, not talking about no one at Unity team not answering today to my question :). Sorry if I sounded rought. I really appreciate your help and time.
About the shaders, I just have a shader set on the box, and it is the default diffuse one :/. On the other hand I have added a collider to the box to check if Physics.Simulate was having a different behaviour, but it behaves the same. I have attached the scene.
P.D. Could it be I shouldn’t take this odd reads into account? Perhaps this peaks are not really happening? I don’t mind for highest devices but for low end ones, every cycle is important.
Yes I read a lot of threads before posting. Beside this Physics.Simulate() peak I can see other calls to physics.Simulate() not such high but important in other frames.