Hi folks!
I’ve got some issues/questions regarding the Unity Event System. What I’m trying to archive, is to be able to bind method calls in the editor on the buttons I created. I made different kinds of toolboxes with buttons consisting of simple cubes. When one of these buttons is pressed, the method defined in the editor window should be called. So far so good. This is easily possible with UnityAction or UnityEvent. But I need to add a sender object to be able to access it later.
What I tried so far:
Using UnityAction’s Invoke() without any parameters → is serialized in the editor, but I can’t provide the sending object.
Using UnityAction’s Invoke with a parameter of type of the class that is calling the function → works, but I have to manually drag the object itself in the parameter slot, which is quite ugly.
Using UnityAction's Invoke with the object type specified in the template → should work, but this isn’t serialized in the editor.
Using class definition MyClassEvent : UnityEvent (with serialized attribute, of course) → should also work, but in the class the Invoke points to, I have to define the calling class as parameter. Looks good. But: This parameter is serialized in the editor again and is not filtered. So its basically the same as No. 2.
So: What is the right way to do it? I just need to call a function with the sender as object but the function itself should be displayed configured parameterlessly in the editor. Like I “secretly” pass another parameter to it.
Anyway: Where is the difference between UnityAction and UnityEvent since I can Invoke both of them and add listeners to both of them?

