- Home /
Hook up external Events into Unity Events System
Imagine I have a phone (Client) and want to use it as touchpad for my notebook (Server App) or touchpad for my Unity App/Game (Server App).
In Unity (Server App) I am recieving these remote events from my phone (Client) e.g. TouchStarted, TouchMoved and TouchEnded (incl. the x,y Coordinates). Now in Unity I want accordingly hook up these events with Unity Touch Event system. So that if at that specific coordinate there was a button, it automatically triggers that button click event.
I don't know if that it possible, but after such an implementation, I should actually get touchCounts on my Server, when I press on my Phone.
if (Input.touchCount > 0) // should be true when I touch on my phone
So I will need something like Input.SetTouch("TouchStarted", x, y); and Unity will handle the rest by itself.
Your answer
Follow this Question
Related Questions
How do I detect when UI events are triggered on *any object*? 1 Answer
Input registering random touches 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
Send UI Button Event with key press NOT onClick()??? 2 Answers
How do I add a value to anywhere Input.GetAxis("Horizontal") is called? 1 Answer