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