serie增加自定义参数

This commit is contained in:
monitor1394
2021-05-20 21:51:52 +08:00
parent 0c549bf23b
commit d9f99e0d27
4 changed files with 59 additions and 6 deletions

View File

@@ -182,6 +182,18 @@ namespace XCharts
PropertyField(prop, filed);
}
}
var customs = chart.GetCustomSerieInspectorCustomFileds();
if (customs != null && customs.Length > 0)
{
foreach (var custom in customs)
{
var customProp = prop.FindPropertyRelative(custom[0]);
var anatherName = custom[1] + " (" + customProp.displayName + ")";
EditorGUI.PropertyField(m_DrawRect, customProp, new GUIContent(anatherName));
m_DrawRect.y += EditorGUI.GetPropertyHeight(prop);
m_Heights[m_KeyName] += hig;
}
}
break;
}
PropertyField(prop, "m_ItemStyle");