Best settings for Event System on each platform?

What are the best settings for this? Currently I use (Unity 4.6.4):

Android/IOS:

  • Standalone Input Module - Inactive
  • (Allow Activation on Mobile - False)
  • Touch Input Module - Active
  • (Allow Activation on Standalone- True)

Windows Store/Windows Phone

  • Standalone Input Module - True
  • (Allow Activation on Mobile - True)
  • Touch Input Module - Inactive
  • (Allow Activation on Standalone- False)

This is because if I have both input modules active for a touch-screen Windows 8 PC then this messes everything up because it registers both a touch and mouse click for every touch.

I haven’t seen any documentation anywhere about this. I know Unity don’t even own a touch screen Windows 8 PC so they probably haven’t tested it with these settings.

They did say they were going to integrate both modules together to deal with touch screen PCs or tablets with connectable keyboards. Has anything been done in this regards? Thanks.

Really these settings should be automatic depending on the platform. Or else just don’t register both a touch and a click on touchscreen PCs. The next best thing would to have some official documentation of what to set these to on different devices.

We’ve fixed recently so that mouse presence is detected via first mouse activity, so at least on pure tablet it should work.
As for desktop with touch screen it is still broken, There is a workaround though:
Input.simulateMouseWithTouches = false;

With a touchscreen PC I just turn off the touch event module since all touches are just interpreted as mouse clicks anyway.

My solution is better. On each update do:

IF NUMBER OF TOUCH EVENTS>0
DO TOUCH EVENT CODE
ELSE
DO MOUSE EVENT CODE
ENDIF

Simple. Why don’t you do that instead?

Well, that might work, but it could also mess up with things like TouchScreenKeyboard. We don’t want it to open and stay there :slight_smile:

But the input field is broken for mobile anyway so who cares if it gets messed up? Maybe that would actually fix it.

Thank you yoonitee! Your post saved my life on Windows RT tablet.
OnBeginDrag event is not working at all if Touch Input Module - is active
Once I used your settings all started working perfect.

You’re welcome.

Took me about three frustrating months of trying various things, posting numerous messages in the forums, and submitting multiple bug reports before I figured it out. I use these settings for Windows 8 Metro store apps. So they should work for RT devices too I guess. (Only thing that doesn’t work properly is the input text field but that seems to be broken on all mobile devices - best just to design your app so that it doesn’t need it).

I hope they get rid of the Event System in a later update and replace it with something simpler (like my solution). Or at the very least put some documentation about what settings to use. I also hope I’ll win the lottery. But I know neither of these things will happen! :wink:

Actually, you’re welcome to contribute a better solution. uGUI is open-source:
https://bitbucket.org/Unity-Technologies

Cheers. I’m looking for a job. How much do you pay?

(Kind of defeats the point of using a game engine if you have to rewrite everything yourself!)