C# Class UnityEditor.PropertyDrawer

Base class to derive custom property drawers from. Use this to create custom drawers for your own Serializable classes or for script variables with custom PropertyAttributes.

Inheritance: GUIDrawer
显示文件 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
GetPropertyHeight ( UnityEditor.SerializedProperty property, GUIContent label ) : float

Override this method to specify how tall the GUI for this field is in pixels.

OnGUI ( Rect position, UnityEditor.SerializedProperty property, GUIContent label ) : void

Override this method to make your own GUI for the property.

Protected Methods

Method Description
PropertyDrawer ( ) : System

Private Methods

Method Description
GetPropertyHeightSafe ( UnityEditor.SerializedProperty property, GUIContent label ) : float
OnGUISafe ( Rect position, UnityEditor.SerializedProperty property, GUIContent label ) : void

Method Details

GetPropertyHeight() public method

Override this method to specify how tall the GUI for this field is in pixels.

public GetPropertyHeight ( UnityEditor.SerializedProperty property, GUIContent label ) : float
property UnityEditor.SerializedProperty The SerializedProperty to make the custom GUI for.
label UnityEngine.GUIContent The label of this property.
return float

OnGUI() public method

Override this method to make your own GUI for the property.

public OnGUI ( Rect position, UnityEditor.SerializedProperty property, GUIContent label ) : void
position UnityEngine.Rect Rectangle on the screen to use for the property GUI.
property UnityEditor.SerializedProperty The SerializedProperty to make the custom GUI for.
label UnityEngine.GUIContent The label of this property.
return void

PropertyDrawer() protected method

protected PropertyDrawer ( ) : System
return System