Use 2 touches at a time?

I have 2 vertical sliders in my game and when i use 2 fingers to move them both at the same time only one moves.

What code should i put so that 2 of the can move simultaneously?

Thanks

Are you using the 4.6 GUI? If so, you can’t control two different GUI elements at the same time.

I’ve gotten GitHub - TouchScript/TouchScript: Complete multi-touch solution for Unity: iOS, Android, Windows, TUIO. to work with the 4.6 GUI, but it requires that you to add collision boxes and do most of the work manually (I don’t recommend it, but it works for me).

Is there any other way? Like maybe a different layer or something?

Is there any other way? Like maybe a different layer or something?

I’ve done a fair bit of testing and when one object in the GUI system has focus from a touch event, then no other objects will receive any events of any kind. I think it originates in the “Event System” behavior, so without making your own, I’m not sure what can be done.

Whatever you are trying to accomplish can be done by processing Input’s touches yourself and writing some code to make it work, but I don’t think it’s possible to use the default system. I do that myself: using the GUI to render text and buttons and then I process the touches to handle multiple inputs simultaneously.