Villfuk 02
Villfuk 02

Reputation: 111

Unity remote 5 not working

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

Answers (10)

Rohan Mayya
Rohan Mayya

Reputation: 206

Nobody has mentioned this, but it worked for me.

Make sure your build platform is set to Android.

Upvotes: 1

satyajit kairi
satyajit kairi

Reputation: 21

In my case, I was also facing this problem. But now it's working for me...

What I do,

  1. Install SDK latest version... It is important to install your mobile device version to be installed in the SDK...
  2. Install Google Drive Using Android Studio SDK Manager... That is possible after installing Android Studio.
  3. Connected the Android Studio SDK to Unity... By default, it is connected with Unity's default SDK location...
  4. Restart my Unity as well as Unity Remote on my device.
  5. That's all for me.

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

Ludwo
Ludwo

Reputation: 6193

In my case I finally get it working by following these steps:

  1. connect your mobile, run unity remote 5, setup your project
    settings...
  2. go to Edit->Preferences->ExternalTools->AndroidSDK
  3. click copy path button
  4. uncheck "Android SDK Tools Installed with Unity"
  5. paste path in the textbox below or just browse to the same folder as previously set on the Android SDK text box or to your Android SDK location

Now close Preferences window and just click Play in the Unity Editor. Unity restart is not needed.

Upvotes: 0

John Doe
John Doe

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:

  1. Android Build Support module is not installed in the Editor, or the SDK / NDK / JDK paths are misconfigured (it's best to use the Unity-native ones, but you have to explicitly install them together with Android Build Support).
  2. The Google USB Driver is not installed on the computer. You can install it using the SDK Manager in Android Studio, or download the Google USB Driver independently and install it using the Computer Management app in Windows.
  3. The USB wire / port being used does not support file transfer. Not all USB wires and ports are created equal!
  4. Sometimes, it's just the order of opening the app / Unity Editor / plugging in the USB wire that causes the issue. So you'll need to restart your apps or your computer 'til it works.

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

Ben Butterworth
Ben Butterworth

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.

Screenshot of System Preferences

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

Alec
Alec

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:

  • 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'.

Upvotes: 3

Pieter Svenson
Pieter Svenson

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:

  • The original Google Pixel
  • On phone, USB Debugging on
  • On phone, USB default connection -> set to File Transfer
  • On computer, nothing fancy with drivers
  • Unity Remote 5 (Opened before starting Unity)
  • Nothing fancy with running Unity as administrator (some people said to do that)
  • The Unity project on Unity Hub set to target Android on the Unity Hub home screen
  • The Unity project set to Android project (in File -> Build Settings...)

I'm really not sure why it worked for me after 20-something tries.

Upvotes: 1

Azhagarasan Murali
Azhagarasan Murali

Reputation: 355

  1. Ensure you have enabled USB Debugging in your mobile.
  2. Ensure you have set Edit -> Project Settings -> Editor -> Device to Any Android Device.
  3. Ensure you have given the package name in File -> Build Settings -> Player Settings... -> Other Settings (under Android Settings) -> Package Name.
  4. (Optional) Install USB Driver for your mobile. (Normal USB Driver for Redmi)
  5. Close Unity Engine
  6. Connect your mobile via USB.
  7. Launch Unity Remote 5.
  8. Launch Unity Engine in PC
  9. Click on Play

Upvotes: 10

Saleh Hosseini
Saleh Hosseini

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

Villfuk 02
Villfuk 02

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

Related Questions