public static List <ScriptWithEventHandlers> GetEventHandlerScriptsPacked(GameObject go) { List <ScriptWithEventHandlers> list = new List <ScriptWithEventHandlers>(); MonoBehaviour[] components = go.GetComponents <MonoBehaviour>(); foreach (MonoBehaviour component in components) { if (component is ComponentAdapter) { continue; // ignore component descriptors } ScriptWithEventHandlers mapping = new ScriptWithEventHandlers(); mapping.AddRange(GetMethodsBySignature(component.GetType(), typeof(void), typeof(Event))); list.Add(mapping); } return(list); }
public static List<ScriptWithEventHandlers> GetEventHandlerScriptsPacked(GameObject go) { List<ScriptWithEventHandlers> list = new List<ScriptWithEventHandlers>(); MonoBehaviour[] components = go.GetComponents<MonoBehaviour>(); foreach (MonoBehaviour component in components) { if (component is ComponentAdapter) continue; // ignore component descriptors ScriptWithEventHandlers mapping = new ScriptWithEventHandlers(); mapping.AddRange(GetMethodsBySignature(component.GetType(), typeof(void), typeof(Event))); list.Add(mapping); } return list; }