For me the issue was that even though the android SDK had been installed alongside Unity 2019, the SDK path(s) in Edit > Preferences were empty when de-selecting the checkbox. When I hit Browse next to each of the three (JDK, SDK, NDK) then all paths were automatically filled with something similar to C:\Program Files\Unity\Hub\Editor\2019.2.4f1\Editor\Data\PlaybackEngines...
On another machine I tested with, these paths were set automatically, so this is probably a bug some people see and others not.
After this was done, it worked for me, assuming the following setup:
- Device connected to PC using a data cable (not just a charge cable).
- Device has USB debugging enabled via developer mode settings on
device.
- Device authenticated on the PC (for me, I needed to change
the connection type on the phone after plugging it in from File
Transfer to MIDI, which prompted the authentication request, after
which I switched it back to File Transfer).
You can see if a device is authenticated or not by running adb.exe in C:\Program Files\Unity\Hub\Editor\2019.2.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools in a command prompt window (cmd) and the 'list' command: adb.exe list
The connected device will either not show at all (so check your cable) or it will show a GUID followed by 'unauthenticated' (so change the connection type as previously mentioned to prompt for authentication) or it will show 'device' in which case we're good to go.
Start with the editor and remote closed, the device connected and authenticated (this is a one-off setup), and then open Unity Remote. Then open the Unity editor, assuming you've already set the SDK paths, and ensure your Project Settings > Editor > Unity Remote Device is set to Any android device.
You do NOT need to set the Build Settings to target android; this is for deploying the .apk file, and nothing to do with using the device as a remote. Likewise you do NOT need to set a package name or anything else in the Build Settings, at least until you want to deploy the built file to the device, but again this is nothing to do with Unity Remote.
To be clear, my game is not targeting android, and has no android build settings set. The unity remote works perfectly to mirror the game view in the editor, and receive input e.g. tap = 'Fire1'.