public override float GetStaticValueFieldHeight(SerializedProperty valueProperty) { MaterialRefPropertyDrawer materialRefPropertyDrawer = new MaterialRefPropertyDrawer(); GUIContent label = new GUIContent("Material"); return(materialRefPropertyDrawer.GetPropertyHeight(valueProperty, label)); }
public override void DrawStaticValueField(Rect position, SerializedProperty valueProperty) { MaterialRefPropertyDrawer materialRefPropertyDrawer = new MaterialRefPropertyDrawer(); GUIContent label = new GUIContent("Material"); position.height = materialRefPropertyDrawer.GetPropertyHeight(valueProperty, label); materialRefPropertyDrawer.OnGUI(position, valueProperty, label); }