DefaultExpandablePropertyDrawer Class Reference

This version of the ExpandableObjectPropertyDrawer class simply uses the standard property iterator to draw the property members of the drawn property. Essentially, this puts a standard property drawer inside an ExpandableObjectPropertyDrawer control, so the user does not need to specify exactly how to draw it inside OnFoldoutGUI.

Protected Member Functions

override bool AllowCreation ()
 By default objects may be created via the ExpandableObjectPropertyDrawer buttons. Override this function in your derived class to change this.
 
override bool AllowSceneObjects ()
 By default scene objects may be selected. Override this function in your derived class to change this.
 
override float GetFoldoutPropertyHeight (SerializedProperty property, GUIContent label)
 Gets the full height of the control's foldout section, when the control is folded-out. The control does need not be folded-out already when this function is called.
 
override void OnFoldOutGUI (Rect position, SerializedProperty property, GUIContent label)
 Defines what to draw when the property has been expanded (folded-out).
 

Properties

override bool DrawDefaultPropertyOverride [get, set]
 Specifies in the drawer should use the standard drawer for the property, rather than the one specified in this class. Read-only and always false, in this class. Override in your own derived version to change this functionality.
 
- Properties inherited from ExpandableObjectPropertyDrawer
virtual bool DrawDefaultPropertyOverride [get, set]
 Property that defines whether the property should be drawn as an expandable Object, or as a regular Property.
 

Additional Inherited Members

- Public Member Functions inherited from ExpandableObjectPropertyDrawer
override float GetPropertyHeight (SerializedProperty property, GUIContent label)
 Invoked by the UnityEditor, this function should not be overridden in descendants.
 
override void OnGUI (Rect position, SerializedProperty property, GUIContent label)
 Function invoked by unity editor to display the SerializedProperty.
 
- Static Public Member Functions inherited from ExpandableObjectPropertyDrawer
static void DrawProperty (Rect position, SerializedProperty property, GUIContent label, System.Type objectType, bool allowSceneObjects, bool allowCreation, params GUILayoutOption[] options)
 Static function use to Draw a serializedProperty using an ExpandableObjectPropertyDrawer
 
static float GetTotalPropertyHeight (SerializedProperty property, GUIContent label, bool propertyAlwaysExpanded=false)
 Get the current height of the property. Changes depending on current foldout state, and propertyAlwaysExpanded parameter.
 
- Static Public Attributes inherited from ExpandableObjectPropertyDrawer
static bool drawDefaultPropertyOverrideBaseClass
 When set to true, the default property drawer will be drawn. This variable is static, meaning each class derived from this one, will have it's own. This can allow the user to control whether or not to use the standard property drawer, via say... an editor preference option.
 
+ Inheritance diagram for DefaultExpandablePropertyDrawer:
+ Collaboration diagram for DefaultExpandablePropertyDrawer: