Now that we have Unity Remote deployed we can get to the business of using our iOS device as a controller in our game development environment:
If you recall, I mentioned that Unity streams the game to the iOS device. What the IDE is doing is actually streaming the video of what's happening in the game to your device so you will see a variety of compression artifacts, depending on your Wi-Fi connection speed and other factors:
What Unity Remote is doing behind the scenes is getting the frame buffer of the application and compressing that into a video stream and streaming that over to the iOS device. Any device input that is gathered through the iOS device is then transmitted through Wi-Fi to the Unity IDE and used to direct the objects in the environment. Whenever you enter Play mode in the Editor, your device will become the remote control for testing the game.
While this approach is very useful for rapid application development, it is important to note that performance using this approach is approximated at best and you will still want to build and run your application on your device exclusively every so often, to confirm that performance and gameplay is as you expect. Similarly, it is important to note that this approach is very dependent on your Wi-Fi connection. If your device isn't showing a full Wi-Fi signal you can expect significant performance implications.
We have just performed all of the steps necessary to setup our development environment and publish content to Unity. Further we have built our own mini testing lab using Unity Remote so we can utilize our device, yet debug the game in our development environment. This is a crucial milestone as we can now focus entirely on customizing Unity and building games.
One last thing about Unity Remote that is worth noting, while I had you build the remote application yourself you can actually download this in the App Store. Given this you may be asking yourself then why did you have me build it? As an iOS developer, even one using Unity, there are a number of times that you will find yourself needing to debug what is happening under the covers with XCode. In addition, you may find yourself wanting to integrate with some native feature of iOS that isn't supported in Unity. In all of these scenarios you will find yourself digging through the underlying XCode project, so now seemed to be the best time to get familiar with how things are put together.
Links to the Unity Remote:
3.145.204.201