DefaultExposedMemberExpandablePropertyDrawer Class Reference

This class implements the ExpandableObjectPropertyDrawer, for use with ExposedMembers.

Detailed Description

You can derive custom property drawers from this class, for a given "displayable" class (and assign it as the CustomProperty drawer for that class using the CustomProperty attribute).
This will automatically have it display all the ExposedProperties present in the display class. Note: Unless one want to do specific customizations, none of the functions NEED to be overridden.

EyE.EditorUnity.Examples.ObjectSizePropertyDrawer

using UnityEditor;
{
[CustomPropertyDrawer(typeof(ObjectSize))]
public class ObjectSizePropertyDrawer : DefaultExposedMemberExpandablePropertyDrawer { }
}

EyE.EditorUnity.Examples.SoldierPropertyDrawer

Protected Member Functions

override bool AllowCreation ()
 Descendants must override this abstract function to change it's current behavior, which is to ALLOW the creation of new objects, enabling the create button.
 
override bool AllowSceneObjects ()
 Descendants must override this abstract function to change it's current behavior, which is to ALLOw scene objects.
 
override float GetFoldoutPropertyHeight (SerializedProperty property, GUIContent label)
 Gets the height of the foldout section only.
 
override void OnFoldOutGUI (Rect position, SerializedProperty property, GUIContent label)
 Invoked by the base class when the ExpandableObject is actually expanded. This function will draw the folded-out details of the property.
 

Protected Attributes

ExposedObjectMembers exposedObjProperties
 This ExposedObjectMembers computes and cashes the properties that will be exposes by this PropertyDrawer.
 

Properties

override bool DrawDefaultPropertyOverride [get, set]
 override this get accessor to return true, if you would like to draw the default unity property for this object, rather than an ExpandableObjectPropertyDrawer the base set accessor does nothing.
 
- 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 DefaultExposedMemberExpandablePropertyDrawer:
+ Collaboration diagram for DefaultExposedMemberExpandablePropertyDrawer:
EyE.EditorUnity.Examples
This namespace is not included in the DLL modules, it contains code samples intended for documentatio...
Definition: ExtractEyeEnginesLogo.cs:6
EyE
This namespace contains classes that provide various tools for use in the Unity Editor.
Definition: EmbededXMLTooltip.cs:5
EyE.Unity.Examples
Definition: CatDebugExample.cs:7
EyE.Unity
This namespace holds classes that extended or inherit from various Unity defined classes....
Definition: EmbededXMLTooltip.cs:5
EyE.EditorUnity
This namespace is used to provide a User Interface, in Unity's Editor, for various library classes....
Definition: ExtractEyeEnginesLogo.cs:6