Reputation: 111
I tried running unity remote, but when I press play in unity editor, nothing happens on my phone. I think I need to do more than just to connect my phone with pc, set the editor to any android device and press start, but those are the only things it says.
It simply doesn't work and I do not know why.
Thanks for any help.
Upvotes: 9
Views: 25645
Reputation: 206
Nobody has mentioned this, but it worked for me.
Make sure your build platform is set to Android.
Upvotes: 1
Reputation: 21
In my case, I was also facing this problem. But now it's working for me...
What I do,
Note:- Don't clear your Unity Remote app from mobile RAM if you want to RUN your game further after disconnecting from your PC. if you do so, then again if you run it'll not work.
Hope this will help you too...Thanks
Upvotes: 2
Reputation: 6193
In my case I finally get it working by following these steps:
Now close Preferences window and just click Play in the Unity Editor. Unity restart is not needed.
Upvotes: 0
Reputation: 222
Getting Unity Remote to work is really tricky because there are so many different kinds of Android versions and Android devices, and so many different versions of Unity. The Unity Remote app itself is also way overdue for an update (IIRC it's not had any updates for over 4 years).
I recently helped to get Unity Remote working for a couple of different computers. So while we wait for Unity to release an easier-to-use version, here are some things you can try:
I've recently put together an article with more details on the points above. If you need specifics on any of the points above, you can refer to it: https://blog.terresquall.com/2020/05/getting-unity-remote-for-android-to-work-on-windows/
Upvotes: 1
Reputation: 28998
For me (using a Samsung S9 phone and macOS), adb devices
had always shown my device, and I've been able to build mobile apps from Android Studio. However, Unity did not find my device.
I had to install the Samsung SmartSwitch application, which also loaded system software on my mac. I hesitantly accepted (ticked both boxes and clicked ok), and now it works. It takes about 5 seconds after pressing play to actually display the Game view on the device, but the delay is barely noticeable. The FPS is probably around 15-20 though.
note: For me, the Android USB settings did not make a difference. It even works when I set it to "Charging phone only".
Upvotes: 0
Reputation: 966
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:
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'.
Upvotes: 3
Reputation: 301
I had issues with connecting as well. I tried many fixes and I eventually just left my computer and tried later and it worked. The configuration I had at the time was the following:
I'm really not sure why it worked for me after 20-something tries.
Upvotes: 1
Reputation: 355
Upvotes: 10
Reputation: 523
I had similar problems, tried many things but they didn't work,
Found out it was about "ADB" (Android Debug Bridge) that couldn't detect my device
Every driver and software was up to date!
Problem was bad drivers preventing universal driver to handle the device!
Follow my answer here for solving this issue:
https://stackoverflow.com/a/52711048/6046022
Upvotes: 0
Reputation: 111
Ehmm.... I tried everything and then gave up. After a while i updated Unity and it just started working, so yeah. Sorry for wasting your time, but there wasn't any mention that i might just update the engine on the entire internet and i was using Unity 5.4 and Unity Remote 5
Upvotes: 2