Basically what I’m trying to do is recieve a pointer to a script (B)'s function from outside the main script (A) (kind of like in the UI button) so that script B’s function can be called as a result of running a function in script A.
Something like this (taken from UI button):

How would I go about scripting this?
Thanks!