2
\$\begingroup\$

Unity Remote is good app. It allows to connect with Unity while you are running your project in Play mode from the editor.

But what if I want to test game but I don't have an Android phone? Yes, it happens ¯\_(ツ)_/¯

I have a great Android emulator: Nox APP Player

screenshot

The emulator doesn't have USB, so it just show me standsrt text Connect device with a USB cable ..... bla bla bla ...Game in the Unity Editor is running...emulator doesn't display the game.

Can I somehow connect this emulator to unity using Unity Remote? Or using something else? How?

| improve this question | | | | |
\$\endgroup\$
  • \$\begingroup\$ Do You have adb running? Did You inatalled unity remote on emulator? \$\endgroup\$ – Axxxon Jul 26 '16 at 14:36
  • \$\begingroup\$ @Axxxon of course I have installed Unity Remote ))) And I don't know about ADB, but I installed USB Debug and I enable option USB Debugging (debug mode when USB is connected) ..... But emulator doesn't have USB and that option is not make sense...I think \$\endgroup\$ – Alexey Shimansky Jul 26 '16 at 14:50
  • \$\begingroup\$ adb is part of android sdk which allows to check for connected devices, upload files, etc. and which is propably used by unity remote. What is output of adb in your case when emulators runs? Something like:List of devices attached: emulator-5554 device? \$\endgroup\$ – Axxxon Jul 27 '16 at 6:50
3
\$\begingroup\$

I was able to run Unity Remote 4 on standard Android emulator.

Final efect looks something like Final effect

Whole procedure:

  1. Install Unity and open some Unity tutorial project (2D Roguelike tutorial in my case)
  2. Install JDK, Android SDK and setup Android emulator using AVD Manager. My emulator config looks like this:Emulator config

Important note: CPU/ABI option seems to be one of most important ones(Intel x86 emulator didn't work for me)

  1. Then install Unity Remote 4 from apk file to emulator using command: adb.exe install path/to/apk (Windows) or adb install path/to/apk (Linux/Mac).
  2. Then in Edit > Preferences > External Tools - set paths to Android SDK and JDK
  3. In Edit > Project Settings > Editor in section Unity Remote select: Any Android Device.
  4. In File > Build Settings - add Your scenes and switch platform to Android.
  5. Press PLAY in Unity while Android Emulator is running and Unity Remote 4 app is opened.

Tip: At first I needed to restart unity after all changes, because it wasn't starting game on emulator. Now it runs everytime.

Note: My emulator config was only for test purposes, so You can find better config for yourself.

Note2: I have not tested this solution with other emulators like: Nox App Player or Genymotion.

Note3: Using emulator may be very laggy.

| improve this answer | | | | |
\$\endgroup\$
  • \$\begingroup\$ Thanks for your answer. It works for AVD Manager emulators.I've tried them too, before I asked the question, and they didn't work because of CPU/ABI Intel x86 as you said...now it works with ARM armeabi... Unfortunately NOX APP PLayer doesn't connect...may be it because its not have CPU/ABI settings....it is said....Because NOX APP has touch simulating, screen shaking and other good stuff for checking game. AVD emulators doesn't have these things :'-( therefore they are useless for me....I upvote your answer and I'll accept it later \$\endgroup\$ – Alexey Shimansky Jul 27 '16 at 13:12
1
\$\begingroup\$

Not sure if you still need the solution for this problem, but I think I should leave an solution for those who come later.

You can connect Nox with Unity via UnityRemote (I'm using Unity Remote 5) with the adb of Nox. Here the steps :

  • Rename your adb.exe to other (i.e adb_origin.exe). It's normally located at SDK folder\platform-tools
  • Go to Nox installation folder\bin, looking for nox_adb.exe, copy it to the location of your origin adb.exe
  • Rename nox_adb.exe to adb.exe
  • Open cmd and enter : adb.exe connect localhost:62001 and you will see "already connected to localhost:62001". If not, you can try replace localhost by 127.0.0.1
  • Then apply steps 3->7 of @Axxxon
  • At the Resolution dropdown, you can choose Normal (default is Downsize) to have better image quality on Nox

Note that after all of this, you should restore the origin adb.exe for later use. Here is my result picture : Picture

Hope this will useful.

| improve this answer | | | | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.