Performance Analysis

Does anybody know if there are any tools for doing performance analysis in unity? What I have in mind would be something similar to NVidia’s NVPerfHUD…

Thanks,
Gabriel Giurgeanu

On a Mac you can use OpenGL profiler and OpenGL Driver Monitor (comes with developer tools download I think). On Windows gDEBugger is a similar tool (but commercial).

Aras, thanks a lot for the tip. The OpenGL Driver Monitor and the OpenGL Profiler come, indeed, with the Developer Tools and they are great for debugging and analyzing the bottlenecks in one’s code.

Not having access to the source code, however, makes it somewhat difficult to understand exactly why you’re getting a low frame rate. That is, what you could change in your assets and level design, as opposed to changing the engine’s code.

The problem I am facing with is that I am getting the same FPS rate (a rather low one) no matter the graphics card’s horsepower, the quality settings nor the resolution. The straightforward conclusion here would be that the level I am testing is CPU bound and I am trying to find out why and how I could eliminate this issue.

Any suggestions are most welcome.

Thank you,
Gabriel

Yes, you’re most likely CPU bound. What I’d suggest at least on a Mac: build a player without stripping debug symbols. Then profile it with Shark (also comes with developer tools). Then you’ll see where the time is spent. From the function/class names it would be pretty easy to guess whether it’s physics, rendering, or maybe your scripts (executing scripts will not produce symbols in the profiler though, as JITed code is executed).

So I installed the version of XCode that came with Tiger (2.0) and CHUD 2.4.4 (downloaded from Apple).

I launch Shark and choose Process, then my Unity app from the list. I hit start. Shark churns away, then says “analyzing sample” then “ready.” But no window with the results of the analysis comes up.

Is there something really stupid I’m missing?

The Unity application is a Universal Binary with debug symbols turned on.

(OS 10.4.9, PowerBook G4 1.5 GHz/1.5GB)