void SomeFunction(){
//here do some stuff
}
void FunctionThatUsesOtherFunction(Action action){
// Do stuff
action();
}
lets say an example:
using System; // I think you do need to add that one
void SayBigger(int n){
print(n);
}
void CheckAndSayIfBigger(int i , Action action){
if(i>5)action(i);
}
int number = 0;
void Update(){
CheckAndSayIfBigger(number , SayBigger);
number++;
}
Note that the function SayBigger is passed without () because we are passing the address.
If you need to pass a function with return value then same again with Func or Predicate if it returns a boolean.
Passing parameters is no big deal. You pass the method the same way and then you pass the parameter to the method reference.
Delegates do seem pointlessly long compared to other (non-C#) ways of passing functions, but they do fully allow you to pass (prototyped) functions. Looks something like this:
// define in your ArrayLooping class:
public delegate void DoStuffSig(Transform T);
public DoStuffSig HandleBadDataFunc; // HBDF is a plug-in void(Transform) func
// create/set in the client code:
void actualBadDataHandler(Transform tt) { ... } // actual func to pass
HandleBadDataFunc = actualBadDataHandler;
// dispatching, back in your ArrayLooping class:
if( ... ) HandleBadDataFunc(dogTransform);