Version 3.0.8.0

Odin has a dedicated attribute overview with examples

TypeFilterAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public class TypeFilterAttribute : Attribute, _Attribute
Inheritance
  • System.Object
  • System.Attribute
  • TypeFilterAttribute

Constructors

TypeFilterAttribute(String)
Creates a dropdown menu for a property.
public TypeFilterAttribute(string filterGetter)
Parameters
System.String filterGetter

A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible.

Fields

DrawValueNormally
If true, the value will be drawn normally after the type selector dropdown has been drawn. False by default.
public bool DrawValueNormally
DropdownTitle
Gets or sets the title for the dropdown. Null by default.
public string DropdownTitle
FilterGetter
A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible.
public string FilterGetter