public static void ChooseComponentWithWindow(this GameObject parent, Type componentType, Action <Component> onSuccess, Action onFailure = null) { SelectComponentsDialogWindow.ShowWindow("Select component", "GameObject " + parent.name + " has multiple components of type " + componentType.Name + " in it's children. Please select suitable.", parent.GetComponentsExtended(componentType, true), onSuccess, onFailure); }
public static void ChooseComponentWithWindow <T>(this GameObject parent, Action <T> onSuccess, Action onFailure = null) where T : class { SelectComponentsDialogWindow.ShowWindow("Select component", "GameObject " + parent.name + " has multiple components of type " + typeof(T).Name + " in it's children. Please select suitable.", parent.GetComponentsExtended <T>(true), onSuccess, onFailure); }