[ShowInInspector]
public Type Default;
[Title("Show Categories"), ShowInInspector, LabelText("On")]
[TypeSelectorSettings(ShowCategories = true)]
public Type ShowCategories_On;
[ShowInInspector, LabelText("Off")]
[TypeSelectorSettings(ShowCategories = false)]
public Type ShowCategories_Off;
[Title("Prefer Namespaces"), ShowInInspector, LabelText("On")]
[TypeSelectorSettings(PreferNamespaces = true, ShowCategories = true)]
public Type PreferNamespaces_On;
[ShowInInspector, LabelText("Off")]
[TypeSelectorSettings(PreferNamespaces = false, ShowCategories = true)]
public Type PreferNamespaces_Off;
[Title("Show None Item"), ShowInInspector, LabelText("On")]
[TypeSelectorSettings(ShowNoneItem = true)]
public Type ShowNoneItem_On;
[ShowInInspector, LabelText("Off")]
[TypeSelectorSettings(ShowNoneItem = false)]
public Type ShowNoneItem_Off;
[Title("Custom Type Filter"), ShowInInspector]
[TypeSelectorSettings(FilterTypesFunction = nameof(TypeFilter), ShowCategories = false)]
public Type CustomTypeFilterExample;
private bool TypeFilter(Type type)
{
return type.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable<>));
}