Search Unity

Need help with Unity 2017 Profiler

Discussion in 'Editor & General Support' started by TebogoWesi, Sep 14, 2017.

  1. TebogoWesi

    TebogoWesi

    Joined:
    Aug 12, 2014
    Posts:
    159
    I am having trouble connecting the Device to unity Profiler, i have tried just about anything for hours now. . .is anyone having issues with unity 2017.1.1 auto-connecting to device? I tried via USB and WiFi, i tried four different android phones. My ADB is up and working fine, i can connect unity remote just fine but cant seem to profile the apk running on the android. . .(Am having a huge spike that i need to get rid off, only profiling will help, whenever i start my game, the first touch input causes a huge Lag and then goes away, its the first time i see such an issue, i suspect Input.Gettouches(0) but i need to be sure by profiling). . .please advice on how to overcome this issue. BTW: i prefer to profile via USB ADB rather than Wifi.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    have you tried manually entering the ip? (for profiler to connect)
     
  3. TebogoWesi

    TebogoWesi

    Joined:
    Aug 12, 2014
    Posts:
    159
    Yes I did try enter ip directly. . I even disabled firewalls
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
  5. TebogoWesi

    TebogoWesi

    Joined:
    Aug 12, 2014
    Posts:
    159
    Thanks guys for taking time to respond, I got it working, the profiler now detects the apk via usb. Turns out unity is not to blame, android phones are wayyyyy to generic. On some phones simply turning on Debug is not enough I think. I went to the phones settings>developer options> scrolled down and under >Select debug app, I chose my app that I want to debug. Also I scrolled way down and increased the background processes limit to 4 instead of 1

    I turned off unity, plugged the phone into the usb then turned on the unity engine. I selected build and ran so that my old apk in the phone could be overwritten by the new one (but not changing the apk name). I did this so unity could set up the connection between the phone and laptop properly.

    When all processes are done unity launches the profiler automatically as the app runs but nothing will be displayed yet, you have to select your device on the profiler and that's all.

    I guess the trick is to launch unity with the device already connected to the usb and build the app via build and run inside unity.
     
    kienbbtopebox and theANMATOR2b like this.
  6. danbfx

    danbfx

    Joined:
    Feb 22, 2011
    Posts:
    40
    Hi there,

    I’m having this exact issue with an iPhone 6s+. It shows up under the drop down but can’t connect the connection breaks of immeadiately. How to troubleshoot?

    Thx
     
  7. TebogoWesi

    TebogoWesi

    Joined:
    Aug 12, 2014
    Posts:
    159
    Don't know much about iphone but check your usb cable and restart unity, first make sure unity/PC detect your phone. With Iphone you have to do it via Wifi. (I think ADB is for Android).

    Connect your device and pc to the same wifi network while the phone is connected to your usb, and start the process of build and run. I think unity will auto detect the IP address for you.

    Also don't forget to check debug and auto connect profiler in the build settings.

    Check out this note: https://gist.github.com/dev-chee/bc2802644fee4a4aa8e1868005faa719
     
  8. danbfx

    danbfx

    Joined:
    Feb 22, 2011
    Posts:
    40
    Thank you!

    The device is connected via usb cable and shows up in the devices in Unity no problem. We have a real basic problem as the Unity 5 remote won't even work. We disabled firewall. What else could suppress this connection? We have a second machine all the same but windows 7 instead of 10 and it works. Another firewall on the phone? Thx