5
\$\begingroup\$

I would like to profile our Unity mobile game on Android devices in a way similar to profiling Unity games on iOS with Instruments.

I am aware of how to do this using Unity's profiler, I would however like to use a third party profiler for the following reasons:

  • to validate Unity's profiling data
  • to have more visibility into how the app is running, including Unity's functions, etc.
  • the largest lag spikes cause unity's profiler to run out of samples. I'm however very interested in precisely these spikes
  • I'd like to have profile data for longer periods than unity records for
  • I'd like to do analysis over time (not just detailed data for each frame, but also aggregated over a time span)

Essentially I'd like as much visibility as possible to make Android on-device profiling as comprehensive as possible. As close to Instruments on iOS as possible.

So far I've tried with DDMS, but could only get visibility into Andoid OS functions and seeminly nothing in the actual apk - at least nothing I recognised. I tried with mono2x and il2cpp, with all debug features that I'm aware of in build and player settings enabled.

The game is developed with Unity 5,4 with Mono2x.

All help is appreciated. I've listed my intents above, so even if profiling on device is not possible in this way on Andoid, alternate solutions to the listed intents are still very appreciated. Thanks!

\$\endgroup\$
1
\$\begingroup\$

In the Android developer options portion of android settings, there are several options for profiling the gpu and cpu. The gpu-profiling option displays the gpu usage as colorful vertical bars on the screen, while the cpu-profiling option displays horizontal bars corresponding to each process on the system. There is a "record in adb shell dumpsys gfxinfo" option for gpu profiling, but I never used it, so I don't know if it records the data the way you want.

\$\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.