OK, I appreciate this is a weird request but to the way my app was written by the original programmer I have to make this stupid compromise.
But, is there a way to emulate a screen touch on an actual device
if ( XX conditions met)
automatically press on screen button at xx,yy co-ordinates
Is this possible?
Thanks!
“to emulate a screen touch on device” ??? O_o…
you can detect touch screen but to emulate is weird…
What do you want to do?
Why not run the same code as the touches would if the conditions are met?
To emulate them seems kinda wasted.
to emulate it you would need to use objc and send in the touch events yourself. That or have a virtual input layer that wraps around the normal touches so you can fire those virtual touch events (similar to laserlars idea but fully pulled of not just hackish)
Other than that there is no way to do so, Unity is generally not Unit Test friendly when it comes to interaction and similar things I fear.