Hello All,
I’m currently running Unity 3 with the newest version of Remote on an iPhone 4. My problem is that when I run Remote, my standard resolution game is being sent coordinates which represent the full resolution of the iPhone’s high rez screen (2x that of an iPhone 3G). This makes it useless for previewing my current app, not to mention there being a significant time delay between when I tap the screen and when it registers in Unity.
However, when I build the game and run it on the device itself, there are no problems.
Anyone have any ideas on a fix for this?
Thanks in advance!
How is the game being controlled by touches on the screen? Broadly speaking, the solution is to remove fixed pixel offsets and replace them with values relative to the screen size. You can design for a specific screen size and then scale positions by the ratio of that size to the actual screen size of the device. Alternatively, you can code all touch rectangles, etc, so they are specified as fractions of the screen rather than absolute offsets. Which option you choose will depend on what you are doing in reaction to the touches (indeed you may use both approaches at different points in the game).
That makes a lot of sense. It is presently using Rects specified using screen coordinates. It’s just weird to me that the game works on the device but not through Remote. There should be some kind of configuration manager in remote for touch position transmission so as to simulate lower res devices, but this will do the trick. Thanks!