public void OnGUI(ref Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
{
float labelWidth;
float fieldWidth;
float height = position.height;
position.height = 0f;
if (this.m_DecoratorDrawers != null)
{
foreach (MaterialPropertyDrawer drawer in this.m_DecoratorDrawers)
{
position.height = drawer.GetPropertyHeight(prop, label.text, editor);
labelWidth = EditorGUIUtility.labelWidth;
fieldWidth = EditorGUIUtility.fieldWidth;
drawer.OnGUI(position, prop, label, editor);
EditorGUIUtility.labelWidth = labelWidth;
EditorGUIUtility.fieldWidth = fieldWidth;
position.y += position.height;
height -= position.height;
}
}
position.height = height;
if (this.m_PropertyDrawer != null)
{
labelWidth = EditorGUIUtility.labelWidth;
fieldWidth = EditorGUIUtility.fieldWidth;
this.m_PropertyDrawer.OnGUI(position, prop, label, editor);
EditorGUIUtility.labelWidth = labelWidth;
EditorGUIUtility.fieldWidth = fieldWidth;
}
}