Version 3.3.0.1

TypeSelector class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
[HideReferenceObjectPicker]
public class TypeSelector : OdinSelector<Type>, ISelectionChangeListener
Inheritance

Constructors

TypeSelector(TypeSelector.TypeSelectorType, Boolean, Type, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Boolean, TypeSelectorDrawerSettingsAttribute, Action<Boolean>, InspectorProperty)
protected TypeSelector(TypeSelector.TypeSelectorType selectorType, bool supportsMultiSelect, Type selectedType, bool? showCategories, bool? preferNamespaces, bool? showNoneItem, bool excludeInheritors, TypeSelectorDrawerSettingsAttribute settingsAttribute, Action<bool> onToggleShowCategories, InspectorProperty property)
Parameters
TypeSelector.TypeSelectorType selectorType

System.Boolean supportsMultiSelect

System.Type selectedType

System.Nullable<System.Boolean> showCategories

System.Nullable<System.Boolean> preferNamespaces

System.Nullable<System.Boolean> showNoneItem

System.Boolean excludeInheritors

TypeSelectorDrawerSettingsAttribute settingsAttribute

System.Action<System.Boolean> onToggleShowCategories

InspectorProperty property

TypeSelector(AssemblyCategory, Boolean, Type, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Boolean, TypeSelectorDrawerSettingsAttribute, Action<Boolean>, InspectorProperty)
public TypeSelector(AssemblyCategory assemblyCategory, bool supportsMultiSelect = false, Type selectedType = null, bool? showCategories = default(bool? ), bool? preferNamespaces = default(bool? ), bool? showNoneItem = default(bool? ), bool excludeInheritors = false, TypeSelectorDrawerSettingsAttribute settingsAttribute = null, Action<bool> onToggleShowCategories = null, InspectorProperty property = null)
Parameters
AssemblyCategory assemblyCategory

System.Boolean supportsMultiSelect

System.Type selectedType

System.Nullable<System.Boolean> showCategories

System.Nullable<System.Boolean> preferNamespaces

System.Nullable<System.Boolean> showNoneItem

System.Boolean excludeInheritors

TypeSelectorDrawerSettingsAttribute settingsAttribute

System.Action<System.Boolean> onToggleShowCategories

InspectorProperty property

TypeSelector(IEnumerable<Type>, Boolean, Type, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Boolean, TypeSelectorDrawerSettingsAttribute, Action<Boolean>, InspectorProperty)
public TypeSelector(IEnumerable<Type> baseTypes, bool supportsMultiSelect = false, Type selectedType = null, bool? showCategories = default(bool? ), bool? preferNamespaces = default(bool? ), bool? showNoneItem = default(bool? ), bool excludeInheritors = false, TypeSelectorDrawerSettingsAttribute settingsAttribute = null, Action<bool> onToggleShowCategories = null, InspectorProperty property = null)
Parameters
System.Collections.Generic.IEnumerable<System.Type> baseTypes

System.Boolean supportsMultiSelect

System.Type selectedType

System.Nullable<System.Boolean> showCategories

System.Nullable<System.Boolean> preferNamespaces

System.Nullable<System.Boolean> showNoneItem

System.Boolean excludeInheritors

TypeSelectorDrawerSettingsAttribute settingsAttribute

System.Action<System.Boolean> onToggleShowCategories

InspectorProperty property

TypeSelector(Type, Boolean, Type, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Boolean, TypeSelectorDrawerSettingsAttribute, Action<Boolean>, InspectorProperty)
public TypeSelector(Type baseType, bool supportsMultiSelect = false, Type selectedType = null, bool? showCategories = default(bool? ), bool? preferNamespaces = default(bool? ), bool? showNoneItem = default(bool? ), bool excludeInheritors = false, TypeSelectorDrawerSettingsAttribute settingsAttribute = null, Action<bool> onToggleShowCategories = null, InspectorProperty property = null)
Parameters
System.Type baseType

System.Boolean supportsMultiSelect

System.Type selectedType

System.Nullable<System.Boolean> showCategories

System.Nullable<System.Boolean> preferNamespaces

System.Nullable<System.Boolean> showNoneItem

System.Boolean excludeInheritors

TypeSelectorDrawerSettingsAttribute settingsAttribute

System.Action<System.Boolean> onToggleShowCategories

InspectorProperty property

Fields

AssemblyCategory
public AssemblyCategory AssemblyCategory
BaseType
public Type BaseType
BaseTypes
public Type[] BaseTypes
CustomCategory
public string CustomCategory
ExcludeInheritors
public bool ExcludeInheritors
OnToggleShowCategories
public Action<bool> OnToggleShowCategories
PreferNamespaces
public bool PreferNamespaces
SelectedType
public Type SelectedType
SelectorType
public TypeSelector.TypeSelectorType SelectorType
ShowCategories
public bool ShowCategories
ShowHiddenTypes
public bool ShowHiddenTypes
ShowNoneItem
public bool ShowNoneItem
SupportsMultiSelect
public bool SupportsMultiSelect

Methods

AddItemsForType(OdinMenuTree, Type, HashSet<Type>)
protected void AddItemsForType(OdinMenuTree tree, Type type, HashSet<Type> addedTypes = null)
Parameters
OdinMenuTree tree

System.Type type

System.Collections.Generic.HashSet<System.Type> addedTypes

AddType(OdinMenuTree, String, Type, Boolean)
protected void AddType(OdinMenuTree tree, string path, Type type, bool isBaseType)
Parameters
OdinMenuTree tree

System.String path

System.Type type

System.Boolean isBaseType

BuildSelectionTree(OdinMenuTree)
protected override void BuildSelectionTree(OdinMenuTree tree)
Parameters
OdinMenuTree tree

DrawSelectionTree()
protected override void DrawSelectionTree()
DrawToolbar()
protected override void DrawToolbar()
DrawToolbarButtons()
protected void DrawToolbarButtons()
GetPath(Type)
protected string GetPath(Type type)
Parameters
System.Type type

Returns
System.String

ShowInAux()
public OdinEditorWindow ShowInAux()