find where a function is used unity code example
Example: find out which function called unity
At the top of your class, add this import:
using System.Diagnostics;
Then in your function:
string callingFuncName = new StackFrame(1).GetMethod().Name;