Hi, Aren.
I'm making something like remote helper. We have two devices with the same app and layout. User A does something (clicks, drags, etc.), and app transmits his action to User B device.
To accomplish this I need to forward all user input events UICamera gets to the second device, what I'm going to do by passing events from the initial GameObject to corresponding GameObject on linked client.
So, I'm doing this:
UICamera.genericEventHandler = this.gameObject; // <- my intercepting "hub"
The intercepting GameObject has UIEventTrigger script which triggers corresponding method for every event and retargets the event to the second client using UICamera.hoveredObject.name.
But as every of my receiving GameObject has its own event handler, I don't care what kind of event I intercept. I just pass it.
Is there a way I can just pass any event as a string variable without writing numerous methods covering each case (OnPress, OnClick, etc.)?