Hello,
I’m new in Unity. I need to know how can I disable touch input of iPhone during my game is running and then enable it again at run time.
Please any idea will be very helpful.
Thanks,
_Masudias.
Hello,
I’m new in Unity. I need to know how can I disable touch input of iPhone during my game is running and then enable it again at run time.
Please any idea will be very helpful.
Thanks,
_Masudias.
It depends on how you are catching the touches. I use FingerGestures, so if I disable the main component, I won’t have any re-action to touches.
Touch class is mainly working on condition…
Then if you combine it with a Boolean that is very easy to make it enable or disable!
Thanks a lot for kind answers, If you guys can help me with an example code?
Thanks in advance,
_Masudias
to summarize you could just disable the script that handle your touch input , well at least that’s simple thing i will think about.
Get a unique script that handle your touchInput and through a game controller / manager activate and reactivate this script when you need it to work.
function Update()
if (touchEnabled == true)
allowTouch;
if (touchEnabled == false)
doNotAllowTouch;