Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Herman-Tulleken · Nov 01, 2010 at 11:55 AM · androidprofiler

How do I profile on an Android device?

I am trying to use the Profiler to log information (ala this: http://answers.unity3d.com/questions/2228/how-do-i-profile-in-the-web-player), but it does not seem to work (or I can't find the log file). (It does work in my editor though).

Is this feature supported for Android? If so, how do I get it to work (where would I look for the log file, or is there anything special I need to do to set it up?)

If not, is there any other profiling tips for Android?

Edit: Although I accepted the answer below as the best method I found so far, I am still looking for better ways.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · May 01, 2014 at 06:55 AM 0
Share

FTR for 2014. If you're on a $$anonymous$$ac. It works fine these days; don't forget build settings -> development build on, & autoconnect on. $$anonymous$$ake sure the android phone is IDENTICAL wifi box to your $$anonymous$$ac (forget ethernet, etc) (and mobile data off of course - wastes your money anyway :) ) Hope it helps someone

5 Replies

· Add your reply
  • Sort: 
avatar image
11
Best Answer

Answer by Herman-Tulleken · Nov 03, 2010 at 08:11 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Exalia · Aug 20, 2013 at 11:44 AM 0
Share

Is it possible to extract this information and display it via a GUI Text Label?

avatar image
7

Answer by PJisAnarchist · Sep 27, 2012 at 08:42 PM

http://docs.unity3d.com/Documentation/Manual/Profiler.html

Remote profiling can be enabled on Android devices through two different paths : WiFi or ADB.

For WiFi profiling, follow these steps:

 Make sure to disable Mobile Data on your Android device.
 Connect your Android device to your WiFi network.
 Check the "Autoconnect Profiler" checkbox in Unity's build settings dialog.
 Attach your device to your Mac/PC via cable and hit "Build & Run" in Unity Editor.
 When the app launches on the device, open the profiler window in Unity Editor (Window->Profiler)
 If the Unity Editor fails to autoconnect to the device, select the appropriate device from the Profiler Window Active Profiler drop down menu. 

Note: The Android device and host computer (running the Unity Editor) must both be on the same subnet for the device detection to work.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nathan · Jun 24, 2013 at 06:16 PM 1
Share

I tried this, but profiler doesn't show anything. Should I run the scene on the PC when i open the profiler.

avatar image siddharth3322 · Aug 14, 2015 at 02:42 PM 0
Share

Thanks this help me a lot.

avatar image
5

Answer by pgomes · May 28, 2012 at 09:25 AM

For a better access to the logcat information I would recommend installing eclipse together with the ADT Plugin: http://developer.android.com/sdk/eclipse-adt.html

After installed just go to Window > Show View > Logcat.

It may sound like overkill, but having the ability to pause and filter the messages by process ID, Application Name, etc ... is very helpful.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Meltdown · Jul 20, 2012 at 08:24 AM 0
Share

Agreed, using Eclipse and having an interface to sort/filter and view profiling information is far mouse useful than a command prompt/powershell window.

avatar image
1

Answer by ArtyomAbgaryan_old · Aug 29, 2012 at 12:45 AM

Run ..>android-sdk>tools>ddms.bat from sdk folder to see logcat messages (update SDK !)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by doppelmonster · May 15, 2013 at 10:05 AM

http://forum.unity3d.com/threads/78514-Profiler-and-android

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unable to connect Profiler to Android 5 Answers

Unity profiler Gfx.WaitForPresentOnGfxThread 2 Answers

Profiler says that game is running at 10ms(100FPS) but on mobile runs at 45FPS. 2 Answers

Unity 2019.3 LWRP strange Performance Issue on android 0 Answers

Video Player Sometimes Not Playing 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges