mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 22:40:10 +00:00
0.2版本,重构代码,增加Editor
This commit is contained in:
27
Scripts/Editor/PieChartEditor.cs
Normal file
27
Scripts/Editor/PieChartEditor.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI PieChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(PieChart), false)]
|
||||
public class PieChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Pie;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (PieChart)target;
|
||||
m_Pie = serializedObject.FindProperty("m_Pie");
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
EditorGUILayout.PropertyField(m_Pie, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user