Implement the function 'Do' below so that it can be called from any context. unity code example
Example: how to reference function in unity
public GameObject myObject; //make ref. in inspector window
myObject.GetComponent<MyScript>().MyFunction();