2012年4月16日 星期一

【Unity 3D】enable log for android platform

For now, this is what I am doing to get at least some information:

  • Enable "logcat" profiler in the player settings, under Other Settings (Android tab) of Player Settings.
  • Make sure USB debugging is enabled on the Android device (check under Settings | Development).
  • Run adb through the command prompt (with command line argument logcat) that comes with the Android SDK while running the game on the Android, still connected via USB to the computer.

This gives a tiny amount of profiling information (frametime, number of tris, time spend in in different areas, etc.), and updates as the program is run. (It also displays Debug.Log messages, which is even more useful than the actual profiling information).

You can click on the adb window to pause output, and press enter to resume. I run adb through PowerShell - I don't know pausing / resuming will work otherwise.

沒有留言:

張貼留言