Unity Remote (currently at version 4), is a downloadable app designed to help with Android or iOS development. The app connects with Unity while you are running your project in Play mode from the editor. The visual output from the editor is sent to the device’s screen and the live inputs are sent back to the running project in Unity. This allows you to get a good impression of how your game really looks and handles on the target device without the nuisance of a full build for each test.
With version 4, Unity Remote has been completely rewritten and replaces the separate iOS and Android Remote apps used with earlier versions.
Unity Remote currently supports Android devices (on Windows and OSX via a USB connection) and iOS devices (iPhone, iPad and iPod touch, through USB and only on OSX)
The Game view of the running Unity project is duplicated on the device screen but at a reduced framerate. The following input data from the device is also streamed back to the editor:
Note that the Remote app simply shows the visual output on the device and takes input from it. The game’s actual processing is still done by the Unity editor on the desktop machine and so its performance is not a perfect reflection of the built app.
Unity Remote can be downloaded for free in the form of a Unity project that you build yourself or as a pre-built app from the device’s app store:
Having downloaded the app, you should install and run it on your device and also connect the device to your computer using a USB cable.
To enable Unity to work with your device, you should open the Editor Settings in Unity (menu: Edit > Project Settings > Editor) and select the device to use from the Unity Remote section:
If you now click the Play button in the editor, you should see your game appear on the device as well as the Unity game window as Unity connects to the Remote app. While the game plays, input from the device (accelerometer, etc) will be sent to your scripts as if they were running on the device itself.
Currently Unity Remote doesn’t support multiple connected devices of the same kind (ie, two iPhones or two Androids) and to resolve this, it will automatically pick the first device it finds. However, it is fine to have one iOS and one Android device connected at the same time since you can select which one to use from the Editor Settings mentioned above (menu: Edit > Project Settings > Editor).
When you use Unity Remote, the game actually runs in the Unity editor while its visual content is streamed to the target device. Since the bandwidth between editor and device is limited, the stream must be compressed heavily for transmission and this compression inevitably reduces the image quality.
In the Unity Remote section of the Editor settings (menu: Edit > Project Settings > Editor), you can switch the compression method between JPEG and PNG and also optionally downsize the resolution of the screen image. PNG compression is “lossless” (ie, image quality doesn’t degrade) but uses more bandwidth than JPEG. A downsized image has lower bandwidth requirements than one at full resolution. By changing these settings, you can trade image accuracy off against framerate as necessary.
However, you should bear in mind that Unity Remote is only really intended to give a quick approximate check of how your game will look and feel when running on the device. You should make sure that you occasionally do a full build and test the “real” app.
First, make sure you have iOS Target Support installed. Even if you are not creating builds for iOS, you must still have iOS Target Support installed to connect to Unity Remote on iOS devices.
To establish the connection to the iOS device through USB, Unity uses a 3rd party utility (iproxy) which is known to misbehave occasionally. You can try the following to fix the problem:
killall unityiproxy
. Then, restart the editor again.In most cases reconnecting or restarting the iOS device is enough to restore the connection.