/// <summary>
 /// Gets the total event count (sum of runtime and persistent events). Beware this is a hack using reflection.
 /// </summary>
 public int GetTotalEventCount()
 {
     if (!UnityEventReflection.TryAccessCalls(this, ref _callsObject))
     {
         return(0);
     }
     return(UnityEventReflection.GetEventCount(_callsObject) + GetPersistentEventCount());
 }