Skip to content

Instantly share code, notes, and snippets.

@androidzhibinw
Last active November 8, 2023 01:43
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save androidzhibinw/f9e4e990d8bddb516c3e2b7f647a3ed3 to your computer and use it in GitHub Desktop.
Save androidzhibinw/f9e4e990d8bddb516c3e2b7f647a3ed3 to your computer and use it in GitHub Desktop.
Unity profiler for Android
  1. First you select development build for Android.(Build Settings-> Android -> check Develop Build box)

  2. Here is the guide from Unity doc: https://docs.unity3d.com/Manual/ProfilerWindow.html

  3. Before the 'adb forward' you should check the port(34999) first using: netstat -a -o -n | find "34999"

  4. Kill the process that alreay take the port "34999" using: taskkill /F /PID process_id

  5. adb forward --remove-all

  6. adb forward "tcp:34999" "localabstract:Unity-your.package.name

  7. Start your app

  8. Press Ctrl+7 to start Profile window from Unity Editor.

  9. from Unity Profile Window -> Active profiler -> select AndroidPlayer(ADB@127.0.0.1:34999)

  10. Click the "record" you can get the data

@gemfile0
Copy link

gemfile0 commented Jul 5, 2018

This resolved exactly what I suffered over several hours. Thanks.

@NoahZuo
Copy link

NoahZuo commented Mar 21, 2019

This works! Thanks.

@MohamedAtFunrock
Copy link

This works for me Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment