Delegate

Step 1 Declare delegate:

delegate void MyDelegate(int num);

Step 2 Instantiate:

MyDelegate myDelegate;

Step 3 Create a function to be delegated:

void PrintNum(int num){
   Debug.Log("Print Num " + num);
}

Step 4 Assign Function to the delegate:

myDelegate = PrintNum;

Step 5 Activate the Delegate:

myDelegate(50);

Additional multicast:

can use =+ to add more functions to the delegate.

WARNING: must make sure delegate is not empty when invoking:

        if(myMultiDelegate != null)
        {
            myDelegate(50);
        }