TouchScript and uGui (Unity 4.6)

Got a good idea for TouchScript? Post it here.

Re: TouchScript and uGui (Unity 4.6)

Postby luniac » Tue Feb 03, 2015 9:25 am

that script doesn't work right. If i click on a button and unclick, the button remains clicked. valiant effort though.
luniac
 
Posts: 26
Joined: Tue Nov 04, 2014 12:50 am

Re: TouchScript and uGui (Unity 4.6)

Postby smonbrogg » Sun Feb 08, 2015 8:02 pm

Thanks for the feedback!
should work better now.
https://gist.github.com/simonbroggi/553 ... 14a427646b
let me know if you find any issues.
smonbrogg
 
Posts: 2
Joined: Sat Jan 24, 2015 2:16 am

Re: TouchScript and uGui (Unity 4.6)

Postby Martin80 » Tue Feb 10, 2015 6:49 pm

Thank you smonbrogg, it works!
Here you can find a similar solution by amir and emsee: viewtopic.php?f=4&t=12

There is a general (win7) issue I can't deal with, maybe you can help?
The behavior of the first touch input on WIN 7 is very annoying! A "quick touch" (f.e. pressing several buttons onscreen keyboard) on a button is not possible with the first touch input, you need to leave your finger on the button or move your finger slightly to activate a button (pressed), every following touch input behave normal and makes a quick touch possible. This is annoying because fast simple touch clicks get not recognized if there are no other inputs at the same time... have a look at the attached video. I deactivated Unitys standalone input and touchinput, used Win 7Touch Input (Touchscript) with deactivated mouse input!

Any idea how to get rid of this ?
Martin80
 
Posts: 14
Joined: Sat Sep 13, 2014 12:14 am

Re: TouchScript and uGui (Unity 4.6)

Postby luniac » Thu Mar 05, 2015 2:56 am

is there official release for this yet?
luniac
 
Posts: 26
Joined: Tue Nov 04, 2014 12:50 am

Re: TouchScript and uGui (Unity 4.6)

Postby valyard » Thu Mar 05, 2015 2:58 am

not yet
valyard
Site Admin
 
Posts: 433
Joined: Mon Sep 08, 2014 11:57 pm

Re: TouchScript and uGui (Unity 4.6)

Postby luniac » Thu Mar 05, 2015 3:59 am

Understood sir. :)
luniac
 
Posts: 26
Joined: Tue Nov 04, 2014 12:50 am

Re: TouchScript and uGui (Unity 4.6)

Postby gregharding » Sun Mar 22, 2015 4:33 pm



Here's an updated one based on the latest Unity UI code, Simon's gist and the TouchScript source. It supports fake input, ignoring brief touches, and cancelled touches. There's also a TUIO Object manager that's set up in a similar way.

TouchScriptInputModule.cs
TUIOObjectManager.cs
gregharding
 
Posts: 1
Joined: Sun Mar 22, 2015 4:23 pm

Re: TouchScript and uGui (Unity 4.6)

Postby arun02139 » Mon Mar 30, 2015 9:15 am

To block Touchscript when interacting with uGUI I'm using noamg's solution (cleaned it up a little, see below gist).
https://gist.github.com/arun02139/d50fab7060b9404a1f92

Only 10 lines of real code and it's working great! Btw, I'm the original poster at http://answers.unity3d.com that inspired him, I guess one hand really does wash the other :p
arun02139
 
Posts: 17
Joined: Tue Oct 28, 2014 11:44 am

Re: TouchScript and uGui (Unity 4.6)

Postby noamg » Mon Mar 30, 2015 10:28 am

I switched to using this trick to get them to work together :

viewtopic.php?f=1&t=24291

Its been more consistent for me with some weird edge cases.
noamg
 
Posts: 15
Joined: Wed Nov 26, 2014 1:12 pm

Re: TouchScript and uGui (Unity 4.6)

Postby arun02139 » Mon Mar 30, 2015 10:47 am

@noamg Thanks for sharing the above thread!

Odd, for me this solution seems to be the inconsistent one; when I have a fullscreen uGUI window open, some areas block touch and other's don't... What were some of the 'weird edge cases' you experienced?

FWIW (For What It's Worth) I get around the 'PressGesture' not being detected by making it a LongPressGesture with a Time to Press of 0.01 :p

Hoping for a cleaner solution in the future!

EDIT: Ah I think I see the problem... I want to stop TouchScript not only for the background layer but for anything else that might be deeper in my touch hierarchy (Fullscreen -> Board -> Dice)... I would have to have this script on all those objects as well right? Some of them are created dynamically so I would then need extra code in Awake() to hook up with the UGUIHitTest GameObject... I'll go with the solution that concentrates code in as few areas as possible for now :p I've there is something I'm overlooking please comment! Not super happy with either solution right now...
arun02139
 
Posts: 17
Joined: Tue Oct 28, 2014 11:44 am

PreviousNext

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest