Select monobehaviour function from inspector

I am trying to find out what variables i need to create so that i can have a script that behaves similarly to a button. I want to be able to drag a monobehaviour into a field in the inspector and then choose the function to call, like you do an a UI button. The selected function would then be called on a “OnTrigger” event.

This is a screenshot of a ui button and it shows the fields to which i am refering.

49277-screenshot3.png

You need to expose a UnityEvent variable in your script. Then, when it comes time to call it, simply call Invoke() on it.