Unity Remote 4 touch input broken since version 1.1 on iOS

Ever since I update my Unity Remote 4 to version 1.1 on iOS, touch input is not registered anymore. It was working fine in v1.0, but now the remote only shows the player image, but I can’t press any OnGUI buttons or any of my custom input objects. I haven’t changed anything on the editor or scripts side, only update the remote via the app store on my iPad. I can also confirm, that touch input works, when using the old version Unity Remote 3.

Does anybody else experience these problems with Unity Remote v1.1 on iOS?

Yup I concur.

Did a build of Unity Remote 4 today, after having used 3 for quite some time now, and I was confused as to why the touchPosition values are completely inaccurate, staying entirely in negative values (where it should start from 0,0).

I’m still attempting to find a solution to this, but I am seeing that issues with Remote 4 are not uncommon. Any help would be very much appreciated.

-Steven

Thanks Steven!

I haven’t reported a bug yet, since I wanted to make sure the issue occurs for other users as well. I’ll be doing some more testing next week and hopefully I can file a bug report with helpful information.

@Yarbrough8 and @SteveB could you please specify the Unity Version you are using with Unity Remote 4?

Oh sorry!

Unity Pro/iOS Pro 4.5.3f3 with Unity Remote 4 of course.

To further elaborate what’s happening, and this might not even be a bug, but just a change in protocol.

I’m drawing a simple GUIBox that represents one side of my device (iPhone 5) as such:

function OnGUI()
{
        GUI.Box(leftStickBounds,"Left Bounds");
}

…with leftStickBounds derived from:

leftStickBounds = Rect(0, 0, touchZoneWidth, touchZoneHeight);

…with touchZoneWidth and Height being simple variables that represent half of the device’s resolution width and its full height:

if (  iPhone.generation == iPhoneGeneration.iPhone5 )
    {
            //Its an iPhone5 - 1136 x 640 resolution
        touchZoneWidth = 568;
        touchZoneHeight = 640;
    }

…nothing fancy, but!!

Whereas in Unity Remote 3, the Rect was drawn correctly relative to the device. Here in Unity Remote 4, the Rect is drawn first relative to the Game window, and THEN the game is shot over to the phone. So if lets say the Game window in the Editor is small, the GUIBox on the device takes up the whole of the device’s screen. If I use Maximize on Play, the GUIBox is the ‘same size’ relative to itself, but relative to the Maximized viewport it was smaller, so on the device it was ‘smaller’.

The device seems to mirror the Game window in the Editor, rather than having the game play on the device as it should just as it does when it’s Built to the device, and how Unity Remote 3 behaved.

Thanks so much!

-Steven

Unity 4.5.4f1 with the latest version of Unity Remote 4:

  • Create new project.
  • Set up a OnGUI button with sample code from the documentation.
  • Enable “Any iOS Device” in Editor Settings.
  • Connect to Unity Remote 4 on iPad Air iOS 7.1.2 and hit play.
    → Remote shows the button, but touching it on the device doesn’t do anything. When clicking it with the mouse in the editor I get my Debug.Log in the console.

Doing the same thing on Unity Remote 3:
→ Very low quality image, no button animation plays on device or in the editor, but when I touch, I get my console output.

Here is my Unity project (basically empty):
https://www.dropbox.com/sh/oxacvojgz61qvoq/AAB0n1TEJ46oVlpVh4WRnsFpa?dl=0

Thank you guys!

Unity 4.6.0b18 with Unity Remote 4:

  • Set up a default UI button and make it print to the console
  • Choose any combination of the EventSystem components (turn on standalone only, turn on touch input only, turn on everything…)
  • Button works when clicked in editor, but not on iPad Air iOS 7.12.

The same with Unity Remote 3:
→ bad image quality, but working buttons

I would just use the old Remote app, but the image quality is too low to actually play while looking at the device, so I’d rather much prefer the new remote with better quality via usb.

@SteveB I’m sorry but I could no recreate your use case, my buttons and windows use the size determined by the device screen size rather than the game window as it should I guess. Maybe you can also create a small test project?

@Yarbrough8 Thank you for the project, I could reproduce the behaviour on iOS 7 and 8 with Unity Remote 4, but it still works on iOS 6 devices. So this might be a bug. I’ll invest some time tomorrow, to see if it might be a real bug or just a wrong configuration of something. I’ll come back to you asap.

Is there anything you can think of where the editor would display would supersede the device display? Is there a bit of code with regards to drawing the GUIbox that would have it display editor side rather than on the iPhone?

Otherwise I do thank you for your time :slight_smile:

-Steven

@SteveB the only known issue with sizes/stretching is that you must setup correct aspect ratio in the editor’s game view i.e. it must match your device’s screen and orientation. I’m not sure if you use any custom sizes in the editor, do you?

@Yarbrough8 I investigated a little bit and there have been input problems on editor’s side a longer time ago, but this was fixed in subsequent patch releases. Could you please ensure you use the latest versions of Unity Remote 4 and the editor? In doubt, maybe reinstall Unity Remote 4 and fetch a new version. I couldn’t reproduce the problems today anymore after I exchanged Unity Remote 4 :confused:

Thanks David, but I’m afraid I still have the issue on different devices and editor versions. Here is what I did to test again:

  • clean install of Unity 4.5.4f1 and clean install of Unity Remote 4 v1.1 on iPad Air iOS 7.1.2. (not working)
  • clean install of Remote on iPhone 4 (not working)
  • test with Unity Remote 3 on both iOS devices on the same Unity Editor project (works alright)
  • build with xcode to devices (works without problems)

I’m working on Mac OSX 10.9.4, maybe this is an issue that’s specific to my configuration. I can test on Windows in the next couple of days, maybe that clears things up, but so far, I have no clue what’s wrong. I did try different projects, demo projects from the unity site and also the new beta versions 17 and 18 of 4.6, but with no luck. Nothing works on Remote 4.

The Mac version should be fine and I tried similar configurations which all work fine most of the times! Could you please try to use your project:

  • download it
  • change Editor Settings to Unity remote Device - Any iOS Device
  • open the Untitled scene.
  • Change the Scene View Aspect ration to 16:9
  • Connect your device and Start Unity Remote in Landscape mode
  • Run the game

This works for me, if I start the game during Unity Remote is in Portrait mode, it fails.

@David-Berger , Have you found any answers to this problem? I’m having the same issue and it looks other people have it too, since they are posting in unity answers.

I’m using Unity Remote 4. And it shows the game contents on both an Android and an Iphone device.

However, while the input works perfectly in the Android, in the Iphone it reports weird touch positions.
For example if I touch in the lowest part of the screen it reports a coordinate of 560 (when it should be 0) and in the highest part of the screen it reports 1280. The X coordinate seems to be working allright.

I’m just using an OnGUI button. But I have also tested with the EventSystem. And nothing works.

Can you help me?

Ok I figured it out. It was just that it is necessary to start the Unity Remote system in Landscape Mode.

1 Like

I just fixed an issue with Unity Remote 4 on an iPhone 5. Remote was starting in landscape, but upon hitting play in the editor the game would be rendered vertically while Remote was still landscape, resulting in a weirdly stretched image. This broke input as well. Reinstalling Unity Remote 4 fixed the issue right away. Hope this helps someone else googling around in the future :).

Trying Unity Remote 4 for the first time today. It was great to preview the images on the small screen, but I wasn’t able to test gameplay controls at all.
To make sure it wasn’t just errors in my scripting, I also tested it out with the 2d Rougelike tutorial files (from the “Completed” folder, not my own). Still didn’t work.

Here’s a thought, I have this code in both the 2D Rouugelike tutorial and also in my own project. Could it that the #elif is skipped because it being technically played in the editor, not the phone?

//CheckifwearerunningoniOS, Android, WindowsPhone8orUnityiPhone
#elifUNITY_IOS || UNITY_ANDROID || UNITY_WP8 || UNITY_IPHONE

Edit: I tried updating the code in Rougelike tutorial, no luck

#elifUNITY_IOS || UNITY_ANDROID || UNITY_WP8 || UNITY_IPHONE || UNITY_EDITOR || UNITY_EDITOR_OSX || UNITY_EDITOR_WIN

I was also having the same issues, simple canvas button presses didn’t even work either. It only worked when I tried

HendrysTobar’s solution: