Tanoda
|
Custom property drawer for ClassTypeReference properties. More...
Public Member Functions | |
override float | GetPropertyHeight (SerializedProperty property, GUIContent label) |
override void | OnGUI (Rect position, SerializedProperty property, GUIContent label) |
Properties | |
static Func< ICollection< Type > > | ExcludedTypeCollectionGetter [get, set] |
Gets or sets a function that returns a collection of types that are to be excluded from drop-down. A value of null specifies that no types are to be excluded. More... | |
Custom property drawer for ClassTypeReference properties.
Definition at line 17 of file ClassTypeReferencePropertyDrawer.cs.
override float TypeReferences.ClassTypeReferencePropertyDrawer.GetPropertyHeight | ( | SerializedProperty | property, |
GUIContent | label | ||
) |
Definition at line 253 of file ClassTypeReferencePropertyDrawer.cs.
override void TypeReferences.ClassTypeReferencePropertyDrawer.OnGUI | ( | Rect | position, |
SerializedProperty | property, | ||
GUIContent | label | ||
) |
Definition at line 257 of file ClassTypeReferencePropertyDrawer.cs.
|
staticgetset |
Gets or sets a function that returns a collection of types that are to be excluded from drop-down. A value of null
specifies that no types are to be excluded.
This property must be set immediately before presenting a class type reference property field using EditorGUI.PropertyField or EditorGUILayout.PropertyField since the value of this property is reset to null
each time the control is drawn.
Since filtering makes extensive use of ICollection<Type>.Contains it is recommended to use a collection that is optimized for fast lookups such as HashSet<Type> for better performance.
Exclude a specific type from being selected:
Definition at line 56 of file ClassTypeReferencePropertyDrawer.cs.