internal static IEnumerable <MethodInfo> Find <T>(PlayMonoBehaviour host) where T : Attribute { return(host.GetType().GetMethods() .Where(m => m.GetCustomAttributes(typeof(T), false).Length > 0) .ToArray()); }
internal static MethodInfo Find(PlayMonoBehaviour host, string methodName, Type[] parameterTypes) { return(host.GetType().GetMethod(methodName, parameterTypes)); }
internal static MethodInfo Find <T>(PlayMonoBehaviour host, string methodName) where T : Attribute { return(host.GetType().GetMethods() .Where(m => m.GetCustomAttributes(typeof(T), false).Length > 0 && m.Name == methodName).FirstOrDefault()); }