Calling a not-defined-in-script scripts function from inside another script

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):
2181977--144578--Screen Shot 2015-06-29 at 4.48.15 PM.png

How would I go about scripting this?

Thanks!

not that that description makes huge amounts of sense… but are you talking about using UnityEvents? (google that)

Simply expose a UnityEvent to the inspector.