public static bool HasUnityEvent(InputField.SubmitEvent targetEvent, string HasMethodName, UnityEngine.Object hasTarget) { int count = targetEvent.GetPersistentEventCount(); for (int i = 0; i < count; i++) { if (targetEvent.GetPersistentMethodName(i) == HasMethodName && targetEvent.GetPersistentTarget(i) == hasTarget) { return(true); } } return(false); }