Hello there !
I work in C# and I want to implement a custom callback for pointer events, so that it works for any camera, any kind of object, any king of devices (both Touch and Mouse). What I’m having problem with is not the logic itself. I implemented an observer pattern using an interface for objects supposed to receive those events (with methods like OnPointingDeviceEnter, OnPointingDeviceExit …)
But it’s quite boring to ask the user to implement each of those method even though he might want to use only one of those. Plus, I would like to keep it simple for the user, so I’d prefer not to require him to register delegates for each events.
Is there a way not to use any of the aforementioned methods ? How are MonoBehaviour callbacks implemented since users don’t even have to override Update(), Start(), … ?
Thanks in advance for your answers !