Search Unity

Unity Remote 5 not working

Discussion in 'Editor & General Support' started by arvind6572, Jul 31, 2020.

  1. arvind6572

    arvind6572

    Joined:
    Mar 19, 2020
    Posts:
    3
    Hey, I'm having issues with unity remote 5. Its not working when running my project in play mode.
    Im working on ubuntu 20.04 and i have tried unity versions 2020.4.5f1 and 2020.4.3f1.
    Here are somethings I tried:
    1) Changed the run device in build setting to my device
    2) adb devices command shows my device
    3) changed device in editor to any android device
    4) checked several different devices and usb cables.

    project builds fine with no errors and apk works fine as well
     
  2. yokomenuchi_unity

    yokomenuchi_unity

    Joined:
    Jul 17, 2020
    Posts:
    2
    This works for me, using ubuntu 20.04 and android v9 on a Oneplus5 phone:

    -Note: It doesn't matter whether the phone or the pc is powered up first. Key point
    is that you MUST get 'adb shell' cmd working between your phone and your pc,
    before you start up the Unity Engine.

    - assumes you've already set this up on your pc:
    - Under Unity> Edit> Project Settings> Editor> Device
    - set to: 'Any Android device', then back it out to the main screen
    - (onetime step!) as root@ubuntu on the pc: apt install adb
    - the phone is plugged into pc with a suitable cable

    - on your android phone:
    - reboot
    - do a force-stop on Unity Remote5
    - clear the phone cache
    - clear the phone storage (this might be specific to a Oneplus5)
    - start up UnityRemote

    - all remaining steps below are to be done on your ubuntu pc:
    - reboot/startup
    - open a terminal window (commandline):
    - (optional) type : netstat --listen|grep 5555 (confirm that it shows no procs listening on port 5555)
    - type: adb devices
    - it should return at least one valid device for your phone
    - type: adb shell
    - it should drop you into a shell to your phone; if not,
    then you MUST first fix it (by rebooting phone and/or pc)
    - type: exit
    - this will exit the shell
    - start up Unity; press ctrl-p once to start Play, then again to stop it (broadcast won't yet work)
    - (optional): type in the previous netstat cmd, which should show port 5555 is now LISTENing
    - now close or kill off unity procs (on my pc it won't properly close the command I use is:
    kill -9 `ps -ef|grep unity|grep -v mount|cut -d" " -f9`; rm -f /gameCoding/tutorial/Temp/UnityLockfile
    - NOTE: the lockfile path can vary!
    - (MUST DO) in the terminal type: adb shell
    - as before, it should drop you into a shell; exit it
    - start Unity again and use ctrl-p to successfully broadcast to Unity Remote5
    - this works until you reboot the pc, after which you need to repeat some/all of the steps above